From: drjaska Date: Thu, 29 Dec 2022 17:36:56 +0000 (+0200) Subject: allow NIX to live toggle blaster on/off X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=91108959cbd9881ae773011112066f0dc9f4fe91;p=xonotic%2Fxonotic-data.pk3dir.git allow NIX to live toggle blaster on/off --- diff --git a/qcsrc/common/mutators/mutator/nix/sv_nix.qc b/qcsrc/common/mutators/mutator/nix/sv_nix.qc index c53c76eb7..12d76963f 100644 --- a/qcsrc/common/mutators/mutator/nix/sv_nix.qc +++ b/qcsrc/common/mutators/mutator/nix/sv_nix.qc @@ -28,7 +28,6 @@ int autocvar_g_pickup_nails_max; int autocvar_g_pickup_rockets_max; int autocvar_g_pickup_shells_max; -float g_nix_with_blaster; // WEAPONTODO int nix_weapon; float nix_nextchange; @@ -43,8 +42,6 @@ REGISTER_MUTATOR(nix, expr_evaluate(cvar_string("g_nix")) && !MUTATOR_IS_ENABLED { MUTATOR_ONADD { - g_nix_with_blaster = autocvar_g_nix_with_blaster; - nix_nextchange = 0; nix_nextweapon = 0; @@ -92,7 +89,7 @@ bool NIX_CanChooseWeapon(int wpn) } else { - if(wpn == WEP_BLASTER.m_id && g_nix_with_blaster) + if(wpn == WEP_BLASTER.m_id && autocvar_g_nix_with_blaster) return false; if(e.spawnflags & WEP_FLAG_MUTATORBLOCKED) return false; @@ -213,7 +210,7 @@ void NIX_GiveCurrentWeapon(entity this) } STAT(WEAPONS, this) = '0 0 0'; - if(g_nix_with_blaster) + if(autocvar_g_nix_with_blaster) STAT(WEAPONS, this) |= WEPSET(BLASTER); STAT(WEAPONS, this) |= wpn.m_wepset;