FakeFishGames / Barotrauma

A 2D online multiplayer game taking place in a submarine travelling through the icy depths of Jupiter's moon Europa.
http://www.barotraumagame.com/
1.72k stars 400 forks source link

Outpost Shuttle docking ports break in multiplayer #13110

Open UnhappyWithMyUsername opened 9 months ago

UnhappyWithMyUsername commented 9 months ago

Disclaimers

What happened?

tl;dr: If a shuttle attached to an outpost uses two docking ports, only the docking port it was attached/linked to works. The other docking port cannot dock and possible other issues with their setstate behavior.

Decided to revisit the concept of station lifts for DynamicEuropa. Reworked the lifts using the circuit box. Work perfectly fine in editor and Singleplayer. Don't work at all in Multiplayer. Did some testing: Docking ports on my lift refuse to change their state in Multiplayer no matter what. Things like lights and doors hooked up to the same output pin change their state perfectly fine, but the docking ports do not.

Did some more testing with UberPendragon and an alternative lift wiring he did. This enabled the lift to successfully undock and travel upwards, but it fails to dock to the top floor. Once again only in Multiplayer. Works fine in Singleplayer and editor. Forcing the lift to travel downwards again made it dock to its original docking port again.

So one issue is definitely that it is unable to dock with the other docking port that it was not spawned at, basically limiting its docking capacity to a single docking port on the elevator itself.

But due to my original lift not even undocking in Multiplayer, I believe there are multiple issues with them about their setstate behavior.

Here are video clips of my original lift working in Singleplayer but not working in Multiplayer: Singleplayer:

https://github.com/Regalis11/Barotrauma/assets/74098498/3b7ca518-beed-47db-9084-1284be3dff85

Multiplayer:

https://github.com/Regalis11/Barotrauma/assets/74098498/1c532b37-4edf-4396-a928-a17589c0d8ce

Here is a link to the zip file containing both the singleplayer and multiplayer save files as well as the local copy of DynamicEuropa required to load them: Had to upload elsewhere due to 25MB github upload limit. Zip size: 76.6MB https://mega.nz/file/rLpGyDBC#E3vS68f6F_KbVjbTOvElDOd42Sw5m_98S2w9zVQgFvY

The station module is currently configured to spawn with my original lift as seen in the clips. If you want to check the other lift variant that is able to at least dock/undock on one side, open the "DE_Docking_Common_Lift_01" module and change the linked shuttle to the "StationLift_Common_1", save the module and load the save games.

Reproduction steps

  1. Build a lift as a shuttle with docking ports on both sides
  2. Build a docking module that has one bottom and one top floor with space for the lift to travel in
  3. Make the module generate on outposts
  4. Test your lift in Editor and Singleplayer and see if it works fine
  5. Start a multiplayer campaign and try to operate your lift. It will probably either not move or only dock on the side it was docked at the beginning when it spawned.

Or use the pre-made lift, module and savegames contained in the linked zip file.

Bug prevalence

Happens every time I play

Single player or multiplayer?

Multiplayer hosted from the in-game menu (= using a listen server)

-

No response

Version

Other

-

Both unstable and stable version

Which operating system did you encounter this bug on?

Windows

Relevant error messages and crash reports

No response

giists commented 6 months ago

I was able to reproduce this. Moving to bugfixes.