float g_nix_with_laser;
-// WEAPONTODO
+
float nix_weapon;
float nix_weapon_ammo;
float nix_nextchange;
return FALSE;
if(g_weaponarena)
{
- if not(WEPSET_CONTAINS_AW(g_weaponarena_weapons, wpn))
+ if(!(g_weaponarena_weapons & WepSet_FromWeapon(wpn)))
return FALSE;
}
else
return FALSE;
if(e.spawnflags & WEP_FLAG_MUTATORBLOCKED)
return FALSE;
- if not(e.spawnflags & WEP_FLAG_NORMAL)
+ if (!(e.spawnflags & WEP_FLAG_NORMAL))
return FALSE;
}
return TRUE;
nix_nextchange = time; // start the first round now!
else
nix_nextchange = time + autocvar_g_balance_nix_roundtime;
- //WEP_ACTION(nix_weapon, WR_INIT); // forget it, too slow
+ //weapon_action(nix_weapon, WR_PRECACHE); // forget it, too slow
}
if(nix_nextchange != self.nix_lastchange_id) // this shall only be called once per round!
else
Send_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER, CENTER_NIX_NEWWEAPON, nix_weapon);
- WEP_ACTION(nix_weapon, WR_RESETPLAYER);
+ weapon_action(nix_weapon, WR_RESETPLAYER);
// all weapons must be fully loaded when we spawn
entity e;
self.(weapon_load[nix_weapon]) = cvar(strcat("g_balance_", e.netname, "_reload_ammo"));
// nex too
- if(WEP_CVAR(nex, charge))
+ if(autocvar_g_balance_nex_charge)
{
- if(WEP_CVAR_SEC(nex, chargepool))
+ if(autocvar_g_balance_nex_secondary_chargepool)
self.nex_chargepool_ammo = 1;
- self.nex_charge = WEP_CVAR(nex, charge_start);
+ self.nex_charge = autocvar_g_balance_nex_charge_start;
}
}
if(self.nix_lastinfotime != dt)
self.nix_nextincr = time + autocvar_g_balance_nix_incrtime;
}
- WEPSET_CLEAR_E(self);
+ self.weapons = '0 0 0';
if(g_nix_with_laser)
- WEPSET_ANDNOT_EW(self, WEP_LASER);
- WEPSET_OR_EW(self, nix_weapon);
+ self.weapons &= ~WEPSET_LASER;
+ self.weapons |= WepSet_FromWeapon(nix_weapon);
if(self.switchweapon != nix_weapon)
if(!client_hasweapon(self, self.switchweapon, TRUE, FALSE))
float i;
for (i = WEP_FIRST; i <= WEP_LAST; ++i)
if (NIX_CanChooseWeapon(i))
- WEP_ACTION(i, WR_INIT);
+ weapon_action(i, WR_PRECACHE);
}
MUTATOR_HOOKFUNCTION(nix_ForbidThrowCurrentWeapon)
e.ammo_nails = start_ammo_nails;
e.ammo_rockets = start_ammo_rockets;
e.ammo_fuel = start_ammo_fuel;
- WEPSET_COPY_EA(e, start_weapons);
+ e.weapons = start_weapons;
if(!client_hasweapon(e, e.weapon, TRUE, FALSE))
e.switchweapon = w_getbestweapon(self);
}