From f3173efac1b859b7527533e4c032850af15a1306 Mon Sep 17 00:00:00 2001 From: terencehill Date: Wed, 11 Nov 2015 21:57:34 +0100 Subject: [PATCH] Use a more appropriated check --- qcsrc/common/mutators/mutator/instagib/instagib.qc | 3 +-- qcsrc/server/mutators/mutator/gamemode_lms.qc | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/qcsrc/common/mutators/mutator/instagib/instagib.qc b/qcsrc/common/mutators/mutator/instagib/instagib.qc index 2a46dd699..36f008888 100644 --- a/qcsrc/common/mutators/mutator/instagib/instagib.qc +++ b/qcsrc/common/mutators/mutator/instagib/instagib.qc @@ -38,7 +38,6 @@ void instagib_invisibility() void instagib_extralife() {SELFPARAM(); - self.max_health = 1; StartItem(this, ITEM_ExtraLife); } @@ -432,7 +431,7 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, ItemTouch) return MUT_ITEMTOUCH_CONTINUE; } - if(self.max_health) + if(self.itemdef == ITEM_ExtraLife) { other.armorvalue = bound(other.armorvalue, 999, other.armorvalue + autocvar_g_instagib_extralives); Send_Notification(NOTIF_ONE, other, MSG_CENTER, CENTER_EXTRALIVES); diff --git a/qcsrc/server/mutators/mutator/gamemode_lms.qc b/qcsrc/server/mutators/mutator/gamemode_lms.qc index 9843f2369..575bc6904 100644 --- a/qcsrc/server/mutators/mutator/gamemode_lms.qc +++ b/qcsrc/server/mutators/mutator/gamemode_lms.qc @@ -307,7 +307,6 @@ MUTATOR_HOOKFUNCTION(lms, FilterItem) void lms_extralife() {SELFPARAM(); - self.max_health = 1; StartItem(this, ITEM_ExtraLife); } @@ -332,7 +331,7 @@ MUTATOR_HOOKFUNCTION(lms, OnEntityPreSpawn) MUTATOR_HOOKFUNCTION(lms, ItemTouch) {SELFPARAM(); - if(self.max_health) + if(self.itemdef == ITEM_ExtraLife) { Send_Notification(NOTIF_ONE, other, MSG_CENTER, CENTER_EXTRALIVES); PlayerScore_Add(other, SP_LMS_LIVES, autocvar_g_lms_extra_lives); -- 2.39.2