REGISTER_MUTATOR(nix, cvar("g_nix") && !cvar("g_instagib") && !cvar("g_overkill"))
{
- SELFPARAM();
MUTATOR_ONADD
{
g_nix_with_blaster = autocvar_g_nix_with_blaster;
it.ammo_fuel = start_ammo_fuel;
it.weapons = start_weapons;
if(!client_hasweapon(it, PS(it).m_weapon, true, false))
- PS(it).m_switchweapon = w_getbestweapon(self);
+ PS(it).m_switchweapon = w_getbestweapon(it);
});
}
-
- return false;
}
bool NIX_CanChooseWeapon(int wpn)
// get weapon info
entity e = Weapons_from(nix_weapon);
- if(nix_nextchange != self.nix_lastchange_id) // this shall only be called once per round!
+ if(nix_nextchange != this.nix_lastchange_id) // this shall only be called once per round!
{
this.ammo_shells = this.ammo_nails = this.ammo_rockets = this.ammo_cells = this.ammo_plasma = this.ammo_fuel = 0;
if(ent.classname == "target_items") // items triggers cannot work in nix (as they change weapons/ammo)
return true;
- return false;
}
MUTATOR_HOOKFUNCTION(nix, PlayerPreThink)
player.nix_lastchange_id = -1;
NIX_GiveCurrentWeapon(player); // overrides the weapons you got when spawning
player.items |= IT_UNLIMITED_SUPERWEAPONS;
- return false;
}
MUTATOR_HOOKFUNCTION(nix, SetModname, CBC_ORDER_LAST)
{
M_ARGV(0, string) = "NIX";
- return false;
}
#endif