A guest saved by a totem is not a player kill

The guest's health goes through the same totem path as the host's
(applied on the next tick_totem), so the kill check skips a fired totem
for both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-27 06:56:46 +01:00
parent ad70f755d7
commit 6a65ee1124
+2 -2
View File
@@ -264,7 +264,7 @@ impl Game<'_> {
if hurt {
let died = match victim {
// A totem that fired is applied on the next tick_totem, so the
// host is still at zero health but is not dying.
// victim is still at zero health but is not dying.
Victim::Host => self
.player
.as_ref()
@@ -273,7 +273,7 @@ impl Game<'_> {
.hub
.guest(conn)
.and_then(|g| g.motion.as_deref())
.is_some_and(|p| p.health.dead_or_dying()),
.is_some_and(|p| p.health.dead_or_dying() && !p.health.totem_used),
};
if died {
match s.attacker {