-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../../dpdefs/progsdefs.qh"
- #include "../../dpdefs/dpextensions.qh"
- #include "../../common/constants.qh"
- #include "../../common/util.qh"
- #include "../../common/weapons/weapons.qh"
- #include "selection.qh"
- #include "weaponsystem.qh"
- #include "../t_items.qh"
- #include "../autocvars.qh"
- #include "../defs.qh"
-#endif
+#include "selection.qh"
+#include "../_all.qh"
+
+#include "weaponsystem.qh"
+#include "../t_items.qh"
+#include "../waypointsprites.qh"
+#include "../../common/constants.qh"
+#include "../../common/util.qh"
+#include "../../common/weapons/all.qh"
// switch between weapons
void Send_WeaponComplain(entity e, float wpn, float type)
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)
self.hasweapon_complain_spam = time + 0.2;
// 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;
{
// We cannot tokenize in this function, as GiveItems calls this
// function. Thus we must use car/cdr.
- float weaponwant, first_valid, prev_valid, switchtonext, switchtolast, c;
- string rest;
+ float weaponwant, first_valid, prev_valid, switchtonext, switchtolast;
WepSet wepset = '0 0 0';
switchtonext = switchtolast = 0;
first_valid = prev_valid = 0;
if(dir == 0)
switchtonext = 1;
- c = 0;
+ int c = 0;
- rest = weaponorder;
+ string rest = weaponorder;
while(rest != "")
{
weaponwant = stof(car(rest)); rest = cdr(rest);
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)