Damage overlay fixes (#9831)

- Fix death overlay showing when returning to body.
- Made the diff non-linear.
This commit is contained in:
metalgearsloth
2022-07-19 17:09:26 +10:00
committed by GitHub
parent 209212d87d
commit 91adb3edb3
2 changed files with 22 additions and 15 deletions

View File

@@ -55,6 +55,7 @@ public sealed partial class MobStateSystem : SharedMobStateSystem
{
if (TryComp<MobStateComponent>(ev.Entity, out var mobState) && TryComp<DamageableComponent>(ev.Entity, out var damageable))
{
_overlay.DeadLevel = 0f;
SetLevel(mobState, damageable.TotalDamage);
}
else