MUTATOR_CALLHOOK(ClientDisconnect, this);
if (CS(this).netname_previous) strunzone(CS(this).netname_previous); // needs to be before the CS entity is removed!
+ if (CS(this).weaponorder_byimpulse) strunzone(CS(this).weaponorder_byimpulse);
ClientState_detach(this);
Portal_ClearAll(this);
bot_relinkplayerlist();
if (this.clientstatus) strunzone(this.clientstatus);
- if (this.weaponorder_byimpulse) strunzone(this.weaponorder_byimpulse);
if (this.personal) delete(this.personal);
this.playerid = 0;
ATTRIB(Client, cmd_floodcount, int, this.cmd_floodcount);
ATTRIB(Client, cmd_floodtime, float, this.cmd_floodtime);
ATTRIB(Client, wasplayer, bool, this.wasplayer);
+ ATTRIB(Client, weaponorder_byimpulse, string, this.weaponorder_byimpulse);
// networked cvars
{
string o;
o = W_FixWeaponOrder_ForceComplete(wo);
- if(this.weaponorder_byimpulse)
+ if(CS(this).weaponorder_byimpulse)
{
- strunzone(this.weaponorder_byimpulse);
- this.weaponorder_byimpulse = string_null;
+ strunzone(CS(this).weaponorder_byimpulse);
+ CS(this).weaponorder_byimpulse = string_null;
}
- this.weaponorder_byimpulse = strzone(W_FixWeaponOrder_BuildImpulseList(o));
+ CS(this).weaponorder_byimpulse = strzone(W_FixWeaponOrder_BuildImpulseList(o));
return o;
}
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);
}