From 7ab9ba572f4efd91a0b5af0b5a0977b38c1ea034 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 17 Mar 2015 07:42:44 +1100 Subject: [PATCH] Fix a warning when dying in overkill with no attacker set --- qcsrc/server/mutators/mutator_overkill.qc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qcsrc/server/mutators/mutator_overkill.qc b/qcsrc/server/mutators/mutator_overkill.qc index 1d151fc3e..6818b4564 100644 --- a/qcsrc/server/mutators/mutator_overkill.qc +++ b/qcsrc/server/mutators/mutator_overkill.qc @@ -64,6 +64,7 @@ MUTATOR_HOOKFUNCTION(ok_PlayerDamage_SplitHealthArmor) MUTATOR_HOOKFUNCTION(ok_PlayerDies) { entity oldself = self; + entity targ = ((frag_attacker) ? frag_attacker : frag_target); if(self.flags & FL_MONSTER) { @@ -80,7 +81,7 @@ MUTATOR_HOOKFUNCTION(ok_PlayerDies) self.gravity = 1; self.reset = SUB_Remove; setorigin(self, frag_target.origin + '0 0 32'); - self.velocity = '0 0 200' + normalize(frag_attacker.origin - self.origin) * 500; + self.velocity = '0 0 200' + normalize(targ.origin - self.origin) * 500; self.classname = "droppedweapon"; // hax SUB_SetFade(self, time + 5, 1); self = oldself; -- 2.39.5