From: Lyberta Date: Sat, 30 Dec 2017 18:06:59 +0000 (+0300) Subject: Made Invisibility and Speed to be instagib only for now. X-Git-Tag: xonotic-v0.8.5~2394^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=cc34c2293ca6dda44805d3272a58223688e3275f;p=xonotic%2Fxonotic-data.pk3dir.git Made Invisibility and Speed to be instagib only for now. --- diff --git a/qcsrc/common/mutators/mutator/instagib/items.qh b/qcsrc/common/mutators/mutator/instagib/items.qh index ab6843ed5..fe0070afc 100644 --- a/qcsrc/common/mutators/mutator/instagib/items.qh +++ b/qcsrc/common/mutators/mutator/instagib/items.qh @@ -82,7 +82,7 @@ void powerup_invisibility_init(entity item); REGISTER_ITEM(Invisibility, Powerup) { this.m_canonical_spawnfunc = "item_invisibility"; #ifdef GAMEQC - this.spawnflags = ITEM_FLAG_INSTAGIB; + this.spawnflags = ITEM_FLAG_INSTAGIB | ITEM_FLAG_MUTATORBLOCKED; this.m_model = MDL_Invisibility_ITEM; this.m_sound = SND_Invisibility; this.m_glow = true; @@ -117,7 +117,7 @@ void powerup_speed_init(entity item); REGISTER_ITEM(Speed, Powerup) { this.m_canonical_spawnfunc = "item_speed"; #ifdef GAMEQC - this.spawnflags = ITEM_FLAG_INSTAGIB; + this.spawnflags = ITEM_FLAG_INSTAGIB | ITEM_FLAG_MUTATORBLOCKED; this.m_model = MDL_Speed_ITEM; this.m_sound = SND_Speed; this.m_glow = true; diff --git a/qcsrc/common/mutators/mutator/instagib/sv_instagib.qc b/qcsrc/common/mutators/mutator/instagib/sv_instagib.qc index c21623f0e..473e36e10 100644 --- a/qcsrc/common/mutators/mutator/instagib/sv_instagib.qc +++ b/qcsrc/common/mutators/mutator/instagib/sv_instagib.qc @@ -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); }