}
if (weapon_stats < 0 && !((weapons_stat & set) || (weapons_inmap & set)))
{
- if (((it.spawnflags & WEP_FLAG_HIDDEN) || (it.spawnflags & WEP_FLAG_MUTATORBLOCKED) || (it.spawnflags & WEP_FLAG_SPECIALATTACK)))
+ if (it.spawnflags & (WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_SPECIALATTACK))
++nHidden;
else
++disownedcnt;
int nHidden = 0; \
FOREACH(Weapons, it != WEP_Null, { \
if (weapons_stat & WepSet_FromWeapon(it)) continue; \
- if ((it.spawnflags & WEP_FLAG_HIDDEN) || (it.spawnflags & WEP_FLAG_MUTATORBLOCKED) || (it.spawnflags & WEP_FLAG_SPECIALATTACK)) nHidden += 1; \
+ if (it.spawnflags & (WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_SPECIALATTACK)) nHidden += 1; \
}); \
vector table_size = HUD_GetTableSize_BestItemAR((Weapons_COUNT - 1) - nHidden, panel_size, aspect); \
columns = table_size.x; \
}
else
{
- if (((it.spawnflags & WEP_FLAG_HIDDEN) || (it.spawnflags & WEP_FLAG_MUTATORBLOCKED) || (it.spawnflags & WEP_FLAG_SPECIALATTACK)) && !(weapons_stat & WepSet_FromWeapon(it)))
+ if (it.spawnflags & (WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_SPECIALATTACK)
+ && !(weapons_stat & WepSet_FromWeapon(it)))
+ {
continue;
+ }
}
// figure out the drawing position of weapon
{
if(wepent.activeweapon.spawnflags & WEP_FLAG_NOTRUEAIM)
return SHOTTYPE_HITWORLD;
-
+
float nudge = 1; // added to traceline target and subtracted from result TOOD(divVerent): do we still need this? Doesn't the engine do this now for us?
vector vecs, trueaimpoint, w_shotorg;
vector mi, ma, dv;
got += GiveResourceValue(e, RES_HEALTH, op, val);
got += GiveResourceValue(e, RES_ARMOR, op, val);
case "allweapons":
- FOREACH(Weapons, it != WEP_Null && !(it.spawnflags & WEP_FLAG_MUTATORBLOCKED) && !(it.spawnflags & WEP_FLAG_SPECIALATTACK), got += GiveWeapon(e, it.m_id, op, val));
+ FOREACH(Weapons, it != WEP_Null && !(it.spawnflags & (WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_SPECIALATTACK)), got += GiveWeapon(e, it.m_id, op, val));
//case "allbuffs": // all buffs makes a player god, do not want!
//FOREACH(Buffs, it != BUFF_Null, got += GiveBuff(e, it.m_itemid, op, val));
case "allammo":
FOREACH(Weapons, true, {
WepSet set = it.m_wepset = _WepSet_FromWeapon(it.m_id = i);
WEPSET_ALL |= set;
- if ((it.spawnflags) & WEP_FLAG_SUPERWEAPON) WEPSET_SUPERWEAPONS |= set;
+ if (it.spawnflags & WEP_FLAG_SUPERWEAPON) WEPSET_SUPERWEAPONS |= set;
if (it == WEP_Null) continue;
int imp = WEP_IMPULSE_BEGIN + it.m_id - 1;
if (imp <= WEP_IMPULSE_END)
for(i = WEP_FIRST, j = 0; i <= WEP_LAST; ++i)
{
w = Weapons_from(i);
- if((w.spawnflags & WEP_FLAG_HIDDEN) || (w.spawnflags & WEP_FLAG_SPECIALATTACK))
+ if (w.spawnflags & (WEP_FLAG_HIDDEN | WEP_FLAG_SPECIALATTACK))
continue;
if ((j % 3) == 0)
{
for(int imp = 1; imp <= 9; ++imp)
{
string w_list = "";
- ADD_TO_W_LIST(!(it.spawnflags & WEP_FLAG_MUTATORBLOCKED) && !(it.spawnflags & WEP_FLAG_HIDDEN) && !(it.spawnflags & WEP_FLAG_SPECIALATTACK) && !(it.spawnflags & WEP_FLAG_SUPERWEAPON));
+ ADD_TO_W_LIST(!(it.spawnflags & (WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_HIDDEN | WEP_FLAG_SPECIALATTACK | WEP_FLAG_SUPERWEAPON)));
ADD_TO_W_LIST((it.spawnflags & WEP_FLAG_SUPERWEAPON) && !(it.spawnflags & WEP_FLAG_HIDDEN));
- ADD_TO_W_LIST((it.spawnflags & WEP_FLAG_MUTATORBLOCKED) && !(it.spawnflags & WEP_FLAG_HIDDEN) && !(it.spawnflags & WEP_FLAG_SPECIALATTACK));
+ ADD_TO_W_LIST((it.spawnflags & WEP_FLAG_MUTATORBLOCKED) && !(it.spawnflags & (WEP_FLAG_HIDDEN | WEP_FLAG_SPECIALATTACK)));
if(w_list)
KEYBIND_DEF(strcat("weapon_group_", itos(imp)), substring(w_list, 0, -4));
if(imp == 0)
allow_mutatorblocked = M_ARGV(3, bool);
if(allguns)
- d = boolean((weaponinfo.spawnflags & WEP_FLAG_NORMAL) && !(weaponinfo.spawnflags & WEP_FLAG_HIDDEN) && !(weaponinfo.spawnflags & WEP_FLAG_SPECIALATTACK));
+ d = boolean((weaponinfo.spawnflags & WEP_FLAG_NORMAL) && !(weaponinfo.spawnflags & (WEP_FLAG_HIDDEN | WEP_FLAG_SPECIALATTACK)));
else if(!mutator_returnvalue)
d = !(!weaponinfo.weaponstart);
g_weaponarena = 1;
g_weaponarena_list = "All Weapons";
FOREACH(Weapons, it != WEP_Null, {
- if(!(it.spawnflags & WEP_FLAG_MUTATORBLOCKED) && !(it.spawnflags & WEP_FLAG_SPECIALATTACK))
+ if(!(it.spawnflags & (WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_SPECIALATTACK)))
g_weaponarena_weapons |= (it.m_wepset);
});
}
g_weaponarena = 1;
g_weaponarena_list = "Most Weapons";
FOREACH(Weapons, it != WEP_Null, {
- if(!(it.spawnflags & WEP_FLAG_MUTATORBLOCKED) && (it.spawnflags & WEP_FLAG_NORMAL) && !(it.spawnflags & WEP_FLAG_HIDDEN) && !(it.spawnflags & WEP_FLAG_SPECIALATTACK))
+ if ((it.spawnflags & WEP_FLAG_NORMAL) && !(it.spawnflags & (WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_HIDDEN | WEP_FLAG_SPECIALATTACK)))
g_weaponarena_weapons |= (it.m_wepset);
});
}