From: Jakob MG Date: Thu, 29 Dec 2011 20:30:35 +0000 (+0100) Subject: Get rid of some fugly nexball hakks X-Git-Tag: xonotic-v0.6.0~40^2~1^2~1 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=99eb3d6820995625e446e07bb417969192eb4122 Get rid of some fugly nexball hakks --- 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; }