if(g_weaponarena_random)
{
if(g_weaponarena_random_with_laser)
- WEPSET_ANDNOT_EW(self, WEPBIT_LASER);
+ WEPSET_ANDNOT_EW(self, WEP_LASER);
self.weapons = randombits(self.weapons, g_weaponarena_random, FALSE);
if(g_weaponarena_random_with_laser)
- WEPSET_OR_EW(self, WEPBIT_LASER);
+ WEPSET_OR_EW(self, WEP_LASER);
}
self.items = start_items;
if(!culprit || !WEPSET_CONTAINS_EW(attacker, culprit))
culprit = attacker.weapon;
- if(g_weaponarena_random_with_laser && culprit == WEPBIT_LASER)
+ if(g_weaponarena_random_with_laser && culprit == WEP_LASER)
{
// no exchange
}
else
{
if(inWarmupStage)
- w = warmup_start_weapons;
+ WEPSET_COPY_AA(w, warmup_start_weapons);
else
- w = start_weapons;
+ WEPSET_COPY_AA(w, start_weapons);
// all others (including the culprit): remove
- w &~= attacker.weapons;
+ WEPSET_ANDNOT_AE(w, attacker);
+ WEPSET_ANDNOT_AW(w, culprit);
// among the remaining ones, choose one by random
w = randombits(w, 1, FALSE);
if(w)
{
- attacker.weapons |= w;
- attacker.weapons &~= get_weaponinfo(culprit).weapons;
+ WEPSET_OR_EA(attacker, w);
+ WEPSET_ANDNOT_EW(attacker, culprit);
}
}
self.weapons = 0;
if(g_nix_with_laser)
- self.weapons = self.weapons | WEPBIT_LASER;
+ WEPSET_ANDNOT_EW(self, WEP_LASER);
WEPSET_OR_EW(self, nix_weapon);
if(self.switchweapon != nix_weapon)
self.realowner.porto_current = world;
- if(self.cnt < 0 && !failhard && self.realowner.playerid == self.playerid && self.realowner.deadflag == DEAD_NO && !(self.realowner.weapons & WEPBIT_PORTO))
+ if(self.cnt < 0 && !failhard && self.realowner.playerid == self.playerid && self.realowner.deadflag == DEAD_NO && !WEPSET_CONTAINS_EW(self.realowner, WEPBIT_PORTO))
{
setsize (self, '-16 -16 0', '16 16 32');
setorigin(self, self.origin + trace_plane_normal);
{
entity gren;
- if(type == -1)
- {
- if not(self.items & IT_UNLIMITED_SUPERWEAPONS)
- self.weapons = self.weapons - (self.weapons & WEPBIT_PORTO);
- }
-
W_SetupShot (self, FALSE, 4, "porto/fire.wav", CH_WEAPON_A, 0);
// always shoot from the eye
w_shotdir = v_forward;