]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/instagib/sv_instagib.qc
Merge branch 'master' into Lyberta/RSWFix
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / instagib / sv_instagib.qc
index c21623f0e5e12d0bb63d96644e4d4e6a22441f1a..329fc0ddec3d449116fb67a041ad96b27ea8df62 100644 (file)
@@ -19,19 +19,23 @@ float autocvar_g_instagib_speed_highspeed;
 
 REGISTER_MUTATOR(mutator_instagib, autocvar_g_instagib && !g_nexball)
 {
-    MUTATOR_ONADD
-    {
-        ITEM_VaporizerCells.spawnflags &= ~ITEM_FLAG_MUTATORBLOCKED;
-    }
-    MUTATOR_ONROLLBACK_OR_REMOVE
-    {
-        ITEM_VaporizerCells.spawnflags |= ITEM_FLAG_MUTATORBLOCKED;
-    }
+       MUTATOR_ONADD
+       {
+               ITEM_VaporizerCells.spawnflags &= ~ITEM_FLAG_MUTATORBLOCKED;
+               ITEM_Invisibility.spawnflags &= ~ITEM_FLAG_MUTATORBLOCKED;
+               ITEM_Speed.spawnflags &= ~ITEM_FLAG_MUTATORBLOCKED;
+       }
+       MUTATOR_ONROLLBACK_OR_REMOVE
+       {
+               ITEM_VaporizerCells.spawnflags |= ITEM_FLAG_MUTATORBLOCKED;
+               ITEM_Invisibility.spawnflags |= ITEM_FLAG_MUTATORBLOCKED;
+               ITEM_Speed.spawnflags |= ITEM_FLAG_MUTATORBLOCKED;
+       }
 }
 
 void instagib_invisibility(entity this)
 {
-       this.strength_finished = autocvar_g_balance_powerup_strength_time;
+       this.strength_finished = autocvar_g_instagib_invisibility_time;
        StartItem(this, ITEM_Invisibility);
 }
 
@@ -42,7 +46,7 @@ void instagib_extralife(entity this)
 
 void instagib_speed(entity this)
 {
-       this.invincible_finished = autocvar_g_balance_powerup_invincible_time;
+       this.invincible_finished = autocvar_g_instagib_speed_time;
        StartItem(this, ITEM_Speed);
 }
 
@@ -174,6 +178,11 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, MakePlayerObserver)
        instagib_stop_countdown(player);
 }
 
+MUTATOR_HOOKFUNCTION(mutator_instagib, ShouldGiveRandomStartWeapons)
+{
+       return true;
+}
+
 MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerSpawn)
 {
        entity player = M_ARGV(0, entity);
@@ -383,7 +392,7 @@ void replace_with_insta_cells(entity item)
 {
        entity e = new(item_vaporizer_cells);
        setorigin(e, item.origin);
-       e.noalign = item.noalign;
+       e.noalign = Item_ShouldKeepPosition(item);
        e.cnt = item.cnt;
        e.team = item.team;
        e.spawnfunc_checked = true;