From: terencehill Date: Wed, 11 Nov 2015 20:57:34 +0000 (+0100) Subject: Use a more appropriated check X-Git-Tag: xonotic-v0.8.2~1656^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F252%2Fhead;p=xonotic%2Fxonotic-data.pk3dir.git Use a more appropriated check --- 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);