Repairable devices can randomly apply skill check failure effects on player twice
Discussed in https://github.com/FakeFishGames/Barotrauma/discussions/15571
Originally posted by cl0ck-byte January 24, 2025
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?
There's a bug with repairable devices where they might punish the player twice in succession for failing a skill check (zaps the player once and after a while the player gets zapped again).
The intended behavior was to apply skill check failure effects only once.
It is incredibly inconsistent, so reproducing it might be difficult.
Reproduction steps
Too inconsistent in order to be able to reproduce it.
- Try to repair an electrical/mechanical device
- Fail the skill check, either by bad luck or by failing the mini-game
- Unknown variables result in applying the failure effects on the player twice instead of only once
Bug prevalence
Happens every now and then
Single player or multiplayer?
Multiplayer hosted from the in-game menu (= using a listen server)
-
No response
Version
v1.7.7.0 (Winter Update)
-
No response
Which operating system did you encounter this bug on?
Windows
Relevant error messages and crash reports
No response
Notes from testing reproduction of this:
- Hosted an in-game SteamP2P server
- used a captain with a skill of 1 electrical (Set by command)
- used explosion command (explosion 200 0 0 0 0 0.4) a few times on some junctions
- Repaired and failed deliberately (Be on start or the repair button to hasten it)
- Immediately try to select the same junction after having been hit, sometimes you randomly get hit again by shock despite you have not even begun to repair (Only selected the junction box).
- this takes a few tries, but its strange the junctions shock you again, for damage and effect when the repair was cancelled.
Could not see another case where it applied twice (Damage seemed consistant, zap effect was not consistant in stunning however but thats likely something with stacking stuns/the zap).
Sometimes the character autograbs the repairable again and repairing continues without player intervention, so I think that might be why.
There is also some delay between each zapping - it's not like if you were hit twice in a row in a short timespan.