]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Get rid of some fugly nexball hakks
authorJakob MG <jakob_mg@hotmail.com>
Thu, 29 Dec 2011 20:30:35 +0000 (21:30 +0100)
committerJakob MG <jakob_mg@hotmail.com>
Thu, 29 Dec 2011 20:30:35 +0000 (21:30 +0100)
qcsrc/server/cl_weapons.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/gamemode_nexball.qc

index b1f6aabba106d9728c27f967dab608f6a365a0ad..9b407ab6c7fc09140dbb719d85d2d138c43dc4f3 100644 (file)
@@ -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)
index 2fa2b6705d9ad66b8a583fd4d0246ed7280a7d7b..a0cf9c06479975229edaa7299cf0191f6929f3be 100644 (file)
@@ -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;
 }
 
index e732efc6f9db240ed2b5df044ddd1b094618f648..198ee9c8b144b48b20405dd64d0ccc229e7db797 100644 (file)
@@ -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;
 }