bool sys_phys_override(entity this, float dt)
{
int buttons = PHYS_INPUT_BUTTON_MASK(this);
- float idlesince = this.parm_idlesince;
- this.parm_idlesince = time; // in the case that physics are overridden
+ float idlesince = CS(this).parm_idlesince;
+ CS(this).parm_idlesince = time; // in the case that physics are overridden
if (PM_check_specialcommand(this, buttons)) { return true; }
if (this.PlayerPhysplug && this.PlayerPhysplug(this, dt)) { return true; }
- this.parm_idlesince = idlesince;
+ CS(this).parm_idlesince = idlesince;
return false;
}
if (sv_maxidle > 0) {
if (buttons != this.buttons_old
|| this.movement != this.movement_old
- || this.v_angle != this.v_angle_old) { this.parm_idlesince = time; }
+ || this.v_angle != this.v_angle_old) { CS(this).parm_idlesince = time; }
}
PM_check_nickspam(this);
PM_check_punch(this, dt);
void SetChangeParms (entity this)
{
// save parms for level change
- parm1 = this.parm_idlesince - time;
+ parm1 = CS(this).parm_idlesince - time;
MUTATOR_CALLHOOK(SetChangeParms);
}
void DecodeLevelParms(entity this)
{
// load parms
- this.parm_idlesince = parm1;
- if (this.parm_idlesince == -(86400 * 366))
- this.parm_idlesince = time;
+ CS(this).parm_idlesince = parm1;
+ if (CS(this).parm_idlesince == -(86400 * 366))
+ CS(this).parm_idlesince = time;
// whatever happens, allow 60 seconds of idling directly after connect for map loading
- this.parm_idlesince = max(this.parm_idlesince, time - sv_maxidle + 60);
+ CS(this).parm_idlesince = max(CS(this).parm_idlesince, time - sv_maxidle + 60);
MUTATOR_CALLHOOK(DecodeLevelParms);
}
if (sv_maxidle_slots > 0 && (maxclients - totalClients) > sv_maxidle_slots)
{ /* do nothing */ }
- else if (time - this.parm_idlesince < 1) // instead of (time == this.parm_idlesince) to support sv_maxidle <= 10
+ else if (time - CS(this).parm_idlesince < 1) // instead of (time == this.parm_idlesince) to support sv_maxidle <= 10
{
if (this.idlekick_lasttimeleft)
{
}
else
{
- float timeleft = ceil(sv_maxidle - (time - this.parm_idlesince));
+ float timeleft = ceil(sv_maxidle - (time - CS(this).parm_idlesince));
if (timeleft == min(10, sv_maxidle - 1)) { // - 1 to support sv_maxidle <= 10
if (!this.idlekick_lasttimeleft)
Send_Notification(NOTIF_ONE_ONLY, this, MSG_CENTER, CENTER_DISCONNECT_IDLING, timeleft);
ATTRIB(Client, playerid, int, this.playerid);
+ ATTRIB(Client, parm_idlesince, int, this.parm_idlesince);
+
METHOD(Client, m_unwind, bool(Client this));
STATIC_METHOD(Client, Add, void(Client this, int _team));