#endif
.vector movement_old;
-.float buttons_old;
.vector v_angle_old;
.string lastclassname;
sys_phys_fix(this, dt);
if (sys_phys_override(this, dt)) { return; } sys_phys_monitor(this, dt);
- this.buttons_old = PHYS_INPUT_BUTTON_MASK(this);
PHYS_CS(this).movement_old = PHYS_CS(this).movement;
this.v_angle_old = this.v_angle;
int buttons = PHYS_INPUT_BUTTON_MASK(this);
anticheat_physics(this);
if (sv_maxidle > 0) {
- if (buttons != this.buttons_old
+ if (buttons != CS(this).buttons_old
|| CS(this).movement != CS(this).movement_old
|| this.v_angle != this.v_angle_old) { CS(this).parm_idlesince = time; }
}
PM_check_nickspam(this);
PM_check_punch(this, dt);
+
+ CS(this).buttons_old = PHYS_INPUT_BUTTON_MASK(this);
}
void sys_phys_ai(entity this)
ATTRIB(Client, pm_frametime, float, this.pm_frametime);
ATTRIB(Client, pressedkeys, int, this.pressedkeys);
ATTRIB(Client, movement_old, vector, this.movement_old);
+ ATTRIB(Client, buttons_old, int, this.buttons_old);
METHOD(Client, m_unwind, bool(Client this));