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

Walls taking twice as much damage #13990

Closed itchyOwl closed 1 month ago

itchyOwl commented 1 month ago

Discussed in https://github.com/FakeFishGames/Barotrauma/discussions/13967

Originally posted by **HawkinsThe71st** May 16, 2024 ### Disclaimers - [X] I have searched the issue tracker to check if the issue has already been reported. - [ ] My issue happened while using mods. ### What happened? It seems like walls are either taking twice as much damage or their health is set to half of what its supposed to be. Submarine walls have 200 max health, handcannon rounds deal 20 structure damage so 10 shots would be required to fully destroy a wall. A single shot however deals twice as much damage and only 5 shots are enough to fully destroy a wall. ![image](https://github.com/FakeFishGames/Barotrauma/assets/115734437/4168f192-7daa-4af8-bf4f-7f202c7813ed) Tested with other different weapons, creature attacks and explosion command on walls and the damage inflicted was always double. Changing the max health of the wall doesn't seem to make any difference. ### Reproduction steps 1. Shoot a submarine hull/wall section with the handcannon five times ### Bug prevalence Happens regularly ### Single player or multiplayer? Single player ### - _No response_ ### Version v1.4.6.0 (Blood in the Water Update, hotfix 2) ### - _No response_ ### Which operating system did you encounter this bug on? Windows ### Relevant error messages and crash reports _No response_
itchyOwl commented 1 month ago

Was able to repro this. Seems to be caused by FakeFishGames/Barotrauma-development@879ee612, which adds another SetDamage() method call in Structure.AddDamage().

itchyOwl commented 1 month ago

Changing the max health of the wall doesn't seem to make any difference.

Can't confirm this, though. Tested and debugged it, and max health is properly used.

BlackMoons commented 1 month ago

Changing the max health of the wall doesn't seem to make any difference.

Can't confirm this, though. Tested and debugged it, and max health is properly used.

@HawkinsThe71st Likely meant that at different max health, it still took 2x as much damage as it should.

Jasontti commented 1 month ago

Tested in: https://github.com/FakeFishGames/Barotrauma-development/pull/5322/commits/37ca0fdfc5d428f3996d7200554d6dcefbb746ee

Tested with different weapons and monsters Shot from inside and outside of ship

No issues found Closing ticket as completed