// ignore hook button when using other offhand equipment
if (this.offhand != OFFHAND_HOOK)
- if (wpn == WEP_HOOK && !((this.weapons | weaponsInMap) & WepSet_FromWeapon(wpn)))
+ if (wpn == WEP_HOOK && !((STAT(WEAPONS, this) | weaponsInMap) & WepSet_FromWeapon(wpn)))
complain = 0;
if (complain)
}
if (autocvar_g_weaponswitch_debug == 2 && weaponslot(weaponentity) > 0 && !(wpn.spawnflags & WEP_FLAG_DUALWIELD) && !(PS(this).dual_weapons & wpn.m_wepset))
return false; // no complaints needed
- if (this.weapons & WepSet_FromWeapon(wpn))
+ if (STAT(WEAPONS, this) & WepSet_FromWeapon(wpn))
{
if (andammo)
{
FOREACH(Weapons, it != WEP_Null, {
if(i != weaponwant)
if(it.impulse == imp || imp < 0)
- if((this.weapons & (it.m_wepset)) || (weaponsInMap & (it.m_wepset)))
+ if((STAT(WEAPONS, this) & (it.m_wepset)) || (weaponsInMap & (it.m_wepset)))
have_other = true;
});
// skip weapons we don't own that aren't normal and aren't in the map
- if(!(this.weapons & wepset))
+ if(!(STAT(WEAPONS, this) & wepset))
if(!(weaponsInMap & wepset))
if((wep.spawnflags & WEP_FLAG_MUTATORBLOCKED) || have_other)
continue;
FOREACH(Weapons, it != WEP_Null, {
if(i != weaponwant)
if(it.impulse == imp || imp < 0)
- if((this.weapons & (it.m_wepset)) || (weaponsInMap & (it.m_wepset)))
+ if((STAT(WEAPONS, this) & (it.m_wepset)) || (weaponsInMap & (it.m_wepset)))
have_other = true;
});
// skip weapons we don't own that aren't normal and aren't in the map
- if(!(this.weapons & wepset))
+ if(!(STAT(WEAPONS, this) & wepset))
if(!(weaponsInMap & wepset))
if((wep.spawnflags & WEP_FLAG_MUTATORBLOCKED) || have_other)
continue;
// hack to ensure it switches to an OTHER weapon (in case the other fire mode still has ammo, we want that anyway)
Weapon ww;
WepSet set = WepSet_FromWeapon(this.(weaponentity).m_weapon);
- if (this.weapons & set)
+ if (STAT(WEAPONS, this) & set)
{
- this.weapons &= ~set;
+ STAT(WEAPONS, this) &= ~set;
ww = w_getbestweapon(this, weaponentity);
- this.weapons |= set;
+ STAT(WEAPONS, this) |= set;
}
else
{
if(list == 0)
W_CycleWeapon(this, weaponorder_byid, -1, weaponentity);
else if(list == 1)
- W_CycleWeapon(this, this.weaponorder_byimpulse, -1, weaponentity);
+ W_CycleWeapon(this, CS(this).weaponorder_byimpulse, -1, weaponentity);
else if(list == 2)
W_CycleWeapon(this, CS(this).cvar_cl_weaponpriority, -1, weaponentity);
}
if(list == 0)
W_CycleWeapon(this, weaponorder_byid, +1, weaponentity);
else if(list == 1)
- W_CycleWeapon(this, this.weaponorder_byimpulse, +1, weaponentity);
+ W_CycleWeapon(this, CS(this).weaponorder_byimpulse, +1, weaponentity);
else if(list == 2)
W_CycleWeapon(this, CS(this).cvar_cl_weaponpriority, +1, weaponentity);
}