]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
If item touching or spawning is already handled, don't attempt to spawn another life...
authorMario <mario.mario@y7mail.com>
Mon, 19 Oct 2020 01:38:22 +0000 (11:38 +1000)
committerMario <mario.mario@y7mail.com>
Mon, 19 Oct 2020 01:38:22 +0000 (11:38 +1000)
qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc
qcsrc/common/mutators/mutator/instagib/sv_instagib.qc

index 1b7b527d8633dbde2a25f65004b245426b6042e6..ba45f6e7ebd12bfb26259986cd1148f9076c33ec 100644 (file)
@@ -355,6 +355,7 @@ void lms_extralife(entity this)
 
 MUTATOR_HOOKFUNCTION(lms, OnEntityPreSpawn)
 {
+       if (MUTATOR_RETURNVALUE) return false;
        if (!autocvar_g_powerups) return false;
        if (!autocvar_g_lms_extra_lives) return false;
 
@@ -376,6 +377,8 @@ MUTATOR_HOOKFUNCTION(lms, OnEntityPreSpawn)
 
 MUTATOR_HOOKFUNCTION(lms, ItemTouch)
 {
+       if(MUTATOR_RETURNVALUE) return false;
+
        entity item = M_ARGV(0, entity);
        entity toucher = M_ARGV(1, entity);
 
index a23fc36970a6822f5ca48af79b29487c338a5df5..13403b9e35a96d71004db020336fadcdbd9e41b7 100644 (file)
@@ -509,6 +509,8 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerDies)
 
 MUTATOR_HOOKFUNCTION(mutator_instagib, ItemTouch)
 {
+       if(MUTATOR_RETURNVALUE) return false;
+
        entity item = M_ARGV(0, entity);
        entity toucher = M_ARGV(1, entity);
 
@@ -542,6 +544,7 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, ItemTouch)
 
 MUTATOR_HOOKFUNCTION(mutator_instagib, OnEntityPreSpawn)
 {
+       if (MUTATOR_RETURNVALUE) return false;
        if (!autocvar_g_powerups) { return; }
        entity ent = M_ARGV(0, entity);
        // Can't use .itemdef here