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.68k stars 394 forks source link

Disappearing cargo scooter (dropped items disappearing in multiplayer) #7606

Open fire-bot opened 2 years ago

fire-bot commented 2 years ago

Sent by WordPress (issue@barotraumagame.com). Created by fire.


From: Airscrew

Description Playing multiplayer game with four friends. Two of us are doing mission to scan ruins. We equip cargo scooters to travel to the ruins. When I get to a scan site I leave the cargo scooters (drop it) to equip the ruin scanner. I then notice the cargo scooter has dissappeared. My friend tries and the finds the cargo scooter disappears when they equip the ruin scanner.

Steps To Reproduce

Version 0.15.13.0

Operating System Windows

--

This issue was sent from a contact form on https://barotraumagame.com/bug

MaaiG commented 2 years ago

The bodies of the killed monsters that infiltrated the submarine are also disappearing. Sometimes I don’t have time to pick up the loot - I’m fixing the sub. Bodies have to stay. They’re hard to get rid of, but they have to be. That would be fair.

Maybe we should add some mechanics to it - "cut the whale to pieces" before it swelled and exploded. Or his corpse didn’t infect the submarine.

Regalis11 commented 2 years ago

I'm afraid I could not find a way to reproduce this. :/ The underwater scooter seems to stay where I left even after equipping a scanner. I also tried moving to a different location in the ruins and then returning back to where I left the scooter, but no luck.

Regalis11 commented 2 years ago

No known steps to repro, closing

NaturalBornCamper commented 4 months ago

Hello @Regalis11 , I know you closed that bug because you could not reproduce, but this bug is very much existing still. At first I thought I was crazy, my friend event thought it had been destroyed by an EMP grenade, or we thought it floated away but we could hear the sound of the sonar inside it so it might just become invisible. It seems to happen a lot more near/inside alien ruins. Also might only happen in multiplayer but I can't say for sure.

While searching for something else I accidentally found 2 posts of people with the same issue. The problem is so annoying that someone even made a mod to make Cargo Scooters equippable in your hotbar. I had completely stopped using them myself because I was tired of losing loot.

https://www.reddit.com/r/Barotrauma/comments/13tle37/alien_ruin_bug_that_hides_cargo_scooters/ https://steamcommunity.com/app/602960/discussions/1/3199245644686528990/ https://steamcommunity.com/sharedfiles/filedetails/?id=2723040685

Might be related to this one: https://github.com/FakeFishGames/Barotrauma/issues/11799

SomeRandomNoobKekeke commented 4 months ago

~Are you sure you didn't accidentally put it in some alien chest?~ ok, i tried that in multiplayer, very easy to reproduce: just drop cargo scooter into broken alien wall especially near active gravity sphere, 100 out of 100 disappeared scooters

https://github.com/FakeFishGames/Barotrauma/assets/122838333/b7b14a61-c651-45f0-8d96-820795982de9

Regalis11 commented 1 month ago

@SomeRandomNoobKekeke thank you, that seemed to be an easy way to reliably reproduce this! I believe I managed to finally fix this now: https://github.com/FakeFishGames/Barotrauma-development/commit/fb67652328392058f0c114ae5d3091e926589218.

Fixed dropped items sometimes seemingly disappearing client-side in multiplayer, most often cargo scooters around ruins. FakeFishGames/Barotrauma#7606

When an item was dropped, it was considered to be in the same submarine as the character dropping it, even though it may be the position where it gets dropped at is outside the sub if the character is partially inside. The reason why this caused issues was that the server would happily consider the item to still be in the sub (and not teleport it outside unless it moves), while the client applied a positional update which forced refreshing the sub. This caused the item to appear outside the level client-side, basically incorrectly treating the coordinate in the sub's local space as a coordinate in world space.

Fixed by forcing the transform (and the sub) to be refreshed when an item is dropped, causing both the server and the client to move the item outside the sub.