]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/selection.qc
Merge branch 'master' into Mario/vehicles
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / selection.qc
index 89c4253a13f125d6a0e4c0d97aa6920de1c2a9db..868d6b041b0dc9207fa5fbe6920ad6286d04699e 100644 (file)
@@ -26,7 +26,7 @@ float client_hasweapon(entity cl, float wpn, float andammo, float complain)
        if(time < self.hasweapon_complain_spam)
                complain = 0;
 
-       if(wpn == WEP_HOOK && !g_grappling_hook && autocvar_g_nades && !((cl.weapons | weaponsInMap) & WepSet_FromWeapon(wpn)))
+       if(wpn == WEP_HOOK.m_id && !g_grappling_hook && autocvar_g_nades && !((cl.weapons | weaponsInMap) & WepSet_FromWeapon(wpn)))
                complain = 0;
 
        if(complain)
@@ -55,7 +55,7 @@ float client_hasweapon(entity cl, float wpn, float andammo, float complain)
 
                                // always allow selecting the Mine Layer if we placed mines, so that we can detonate them
                                entity mine;
-                               if(wpn == WEP_MINE_LAYER)
+                               if(wpn == WEP_MINE_LAYER.m_id)
                                for(mine = world; (mine = find(mine, classname, "mine")); ) if(mine.owner == self)
                                        f = 1;
 
@@ -262,7 +262,7 @@ void W_SwitchWeapon(float imp)
                else
                        self.selectweapon = imp; // update selectweapon ANYWAY
        }
-       else if(!forbidWeaponUse()) { WEP_ACTION(self.weapon, WR_RELOAD); }
+       else if(!forbidWeaponUse(self)) { WEP_ACTION(self.weapon, WR_RELOAD); }
 }
 
 void W_CycleWeapon(string weaponorder, float dir)