clamp suit integrity at 0%-100%

This commit is contained in:
yuni 2024-05-08 00:32:20 +02:00
parent dc0d4be8ea
commit c38fcaa8dd

View file

@ -405,7 +405,7 @@ fn handle_collisions(
if *entity1 == player || *entity2 == player {
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Crash));
lifeform.adrenaline_jolt += 0.1;
suit.integrity -= 0.03;
suit.integrity = (suit.integrity - 0.03).max(0.0);
}
}
}