From 99eb3d6820995625e446e07bb417969192eb4122 Mon Sep 17 00:00:00 2001 From: Jakob MG Date: Thu, 29 Dec 2011 21:30:35 +0100 Subject: [PATCH] Get rid of some fugly nexball hakks --- qcsrc/server/cl_weapons.qc | 2 -- qcsrc/server/miscfunctions.qc | 4 ---- qcsrc/server/mutators/gamemode_nexball.qc | 11 ++++------- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/qcsrc/server/cl_weapons.qc b/qcsrc/server/cl_weapons.qc index b1f6aabba1..9b407ab6c7 100644 --- a/qcsrc/server/cl_weapons.qc +++ b/qcsrc/server/cl_weapons.qc @@ -282,8 +282,6 @@ float W_IsWeaponThrowable(float w) return 0; if (g_cts) return 0; - if (g_nexball && w == WEP_GRENADE_LAUNCHER) - return 0; wb = W_WeaponBit(w); if(!wb) diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 2fa2b6705d..a0cf9c0647 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -796,10 +796,6 @@ float want_weapon(string cvarprefix, entity weaponinfo, float allguns) t |= (i == WEP_HOOK); } - // we cannot disable porto in Nexball, we must force it - if(g_nexball && i == WEP_PORTO) - t = 1; - return t; } diff --git a/qcsrc/server/mutators/gamemode_nexball.qc b/qcsrc/server/mutators/gamemode_nexball.qc index e732efc6f9..198ee9c8b1 100644 --- a/qcsrc/server/mutators/gamemode_nexball.qc +++ b/qcsrc/server/mutators/gamemode_nexball.qc @@ -141,7 +141,7 @@ void GiveBall(entity plyr, entity ball) self = plyr; self.weaponentity.weapons = self.weapons; self.weaponentity.switchweapon = self.weapon; - self.weapons = W_WeaponBit(WEP_PORTO); + self.weapons = W_WeaponBit(WEP_PORTO); weapon_action(WEP_PORTO, WR_RESETPLAYER); self.switchweapon = WEP_PORTO; W_SwitchWeapon(WEP_PORTO); @@ -936,18 +936,15 @@ MUTATOR_HOOKFUNCTION(nexball_PlayerPreThink) return FALSE; } - MUTATOR_HOOKFUNCTION(nexball_PlayerSpawn) { self.weaponentity.weapons = 0; if(nexball_mode & NBM_BASKETBALL) - return FALSE; - - if(autocvar_g_weapon_stay) - return FALSE; + self.weapons |= W_WeaponBit(WEP_PORTO); + else + self.weapons = 0; //W_WeaponBit(WEP_PORTO); - self.weapons = 0; return FALSE; } -- 2.39.2