From 1123945d2237f04671d4498f2da2aeef91e88f65 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 17 Jun 2018 17:15:30 +1000 Subject: [PATCH] Set health and armor explicitly when killing the player via team change or kill command, fixes a crash --- qcsrc/server/g_damage.qc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index bdbe77352..2efe1475a 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -593,9 +593,9 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, int d // These are ALWAYS lethal // No damage modification here // Instead, prepare the victim for his death... - SetResourceAmount(targ, RESOURCE_ARMOR, 0); + SetResourceAmountExplicit(targ, RESOURCE_ARMOR, 0); targ.spawnshieldtime = 0; - SetResourceAmount(targ, RESOURCE_HEALTH, 0.9); // this is < 1 + SetResourceAmountExplicit(targ, RESOURCE_HEALTH, 0.9); // this is < 1 targ.flags -= targ.flags & FL_GODMODE; damage = 100000; } -- 2.39.2