]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use a more appropriated check 252/head
authorterencehill <piuntn@gmail.com>
Wed, 11 Nov 2015 20:57:34 +0000 (21:57 +0100)
committerterencehill <piuntn@gmail.com>
Wed, 11 Nov 2015 20:57:34 +0000 (21:57 +0100)
qcsrc/common/mutators/mutator/instagib/instagib.qc
qcsrc/server/mutators/mutator/gamemode_lms.qc

index 2a46dd699e1b5426c9735b7a0b3a0ec58424556f..36f00888823f1a879d4a931a675db69426a2e396 100644 (file)
@@ -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);
index 9843f236958ec352afaf5fe021de3b5816ced855..575bc69040474805daee2fef54347a3887dd6f3e 100644 (file)
@@ -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);