From: Mario Date: Tue, 16 Dec 2014 22:42:13 +0000 (+1100) Subject: Make it work X-Git-Tag: xonotic-v0.8.0~70^2~7 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=959e4dfe15ec49a19c1173cb8e086c09225d8bcb;p=xonotic%2Fxonotic-data.pk3dir.git Make it work --- diff --git a/qcsrc/server/mutators/mutator_overkill.qc b/qcsrc/server/mutators/mutator_overkill.qc index ced2e7106..8beb5cb15 100644 --- a/qcsrc/server/mutators/mutator_overkill.qc +++ b/qcsrc/server/mutators/mutator_overkill.qc @@ -91,8 +91,6 @@ MUTATOR_HOOKFUNCTION(ok_PlayerDies) other = world; } - self.ok_lastwep = self.weapon; - self.ok_deathloc = self.origin; self = spawn(); self.ok_item = TRUE; self.noalign = TRUE; @@ -107,6 +105,8 @@ MUTATOR_HOOKFUNCTION(ok_PlayerDies) SUB_SetFade(self, time + 5, 1); self = oldself; + self.ok_lastwep = self.switchweapon; + return FALSE; } @@ -142,6 +142,12 @@ MUTATOR_HOOKFUNCTION(ok_PlayerPreThink) if(self.deadflag != DEAD_NO || !IS_PLAYER(self) || self.frozen) return FALSE; + if(self.ok_lastwep) + { + self.switchweapon = self.ok_lastwep; + self.ok_lastwep = 0; + } + ok_IncreaseCharge(self, self.weapon); if(self.BUTTON_ATCK2) @@ -206,9 +212,6 @@ MUTATOR_HOOKFUNCTION(ok_PlayerSpawn) self.ok_pauseregen_finished = time + 2; - self.switchweapon = self.ok_lastwep; - self.ok_lastwep = 0; - return FALSE; }