From: Rudolf Polzer Date: Mon, 22 Aug 2011 19:32:58 +0000 (+0200) Subject: get rid of weird "forbid change" logic that breaks NIX X-Git-Tag: xonotic-v0.5.0~74^2~6 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=199107db2cb51c1937d0ce2be38d70fba45723e7;p=xonotic%2Fxonotic-data.pk3dir.git get rid of weird "forbid change" logic that breaks NIX --- diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 055982f33..57e520bfc 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -1086,7 +1086,6 @@ void PutClientInServer (void) if(e.spawnflags & WEP_FLAG_RELOADABLE) // prevent accessing undefined cvars self.weapon_load[j] = cvar(strcat("g_balance_", e.netname, "_reload_ammo")); } - self.weapon_forbidchange = FALSE; oldself = self; self = spot; diff --git a/qcsrc/server/cl_weapons.qc b/qcsrc/server/cl_weapons.qc index 310616900..c46a736a0 100644 --- a/qcsrc/server/cl_weapons.qc +++ b/qcsrc/server/cl_weapons.qc @@ -284,8 +284,6 @@ void W_ThrowWeapon(vector velo, vector delta, float doreduce) w = self.weapon; if (w == 0) return; // just in case - if(self.weapon_forbidchange) - return; if(MUTATOR_CALLHOOK(ForbidThrowCurrentWeapon)) return; if(!autocvar_g_weapon_throwable) diff --git a/qcsrc/server/cl_weaponsystem.qc b/qcsrc/server/cl_weaponsystem.qc index 3d7a33278..d1db16d4c 100644 --- a/qcsrc/server/cl_weaponsystem.qc +++ b/qcsrc/server/cl_weaponsystem.qc @@ -34,10 +34,6 @@ float W_WeaponRateFactor() void W_SwitchWeapon_Force(entity e, float w) { - // don't switch to another weapon if we're not allowed to - if(e.weapon_forbidchange) - return; - e.cnt = e.switchweapon; e.switchweapon = w; e.selectweapon = w; diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index 6ef2bfcd0..d5ef02034 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -210,7 +210,6 @@ void w_clear(); void w_ready(); // VorteX: standalone think for weapons, so normal think on weaponentity can be reserved by weaponflashes (which needs update even player dies) .float weapon_nextthink; -.float weapon_forbidchange; .void() weapon_think; //float PLAYER_WEAPONSELECTION_DELAY = ); diff --git a/qcsrc/server/w_hagar.qc b/qcsrc/server/w_hagar.qc index a628be25b..adfd15de8 100644 --- a/qcsrc/server/w_hagar.qc +++ b/qcsrc/server/w_hagar.qc @@ -242,13 +242,11 @@ void W_Hagar_Attack2_Load (void) if(self.hagar_load) { - self.weapon_forbidchange = TRUE; if(!self.BUTTON_ATCK2 || ((loaded || !enough_ammo) && self.hagar_loadstep < time && !autocvar_g_balance_hagar_secondary_load_hold)) W_Hagar_Attack2_Load_Release(); } else { - self.weapon_forbidchange = FALSE; self.hagar_loadbeep = FALSE; }