Barotrauma icon indicating copy to clipboard operation
Barotrauma copied to clipboard

Kill characters before removing them with status effects

Open TheNinjaScout opened this issue 1 year ago • 0 comments

Fixes https://github.com/FakeFishGames/Barotrauma/discussions/15279

Adds a new character boolean property called TriggerDeathEffects (set to true by default) which prevents the character from triggering "OnDeath" type status effects as well as death sounds and the multiplayer chat notification when they die, if set to false, essentially resulting in a silent death. This is synced between the server and the clients in order to fully work in multiplayer as it does in singleplayer.

When characters are removed through status effects, we now set this new property to false, as well as kill them before removing them, making removing characters work just like it did before, with the added benefit of counting them as dead, fixing various issues.

TheNinjaScout avatar Nov 29 '24 17:11 TheNinjaScout