From: Mario Date: Sun, 17 Jun 2018 07:15:30 +0000 (+1000) Subject: Set health and armor explicitly when killing the player via team change or kill comma... X-Git-Tag: xonotic-v0.8.5~2027 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1123945d2237f04671d4498f2da2aeef91e88f65;p=xonotic%2Fxonotic-data.pk3dir.git Set health and armor explicitly when killing the player via team change or kill command, fixes a crash --- 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; }