#define PHYS_DODGING_WALL autocvar_sv_dodging_wall_dodging
#define PHYS_DODGING_AIR autocvar_sv_dodging_air_dodging
#define PHYS_DODGING_MAXSPEED autocvar_sv_dodging_maxspeed
-#define PHYS_DODGING_PRESSED_KEYS(s) (s).pressedkeys
// we ran out of stats slots! TODO: re-enable this when prediction is available for dodging
#if 0
#ifdef CSQC
#define PHYS_DODGING_FRAMETIME (1 / (frametime <= 0 ? 60 : frametime))
#define PHYS_DODGING_TIMEOUT(s) STAT(DODGING_TIMEOUT)
+ #define PHYS_DODGING_PRESSED_KEYS(s) (s).pressedkeys
#elif defined(SVQC)
#define PHYS_DODGING_FRAMETIME sys_frametime
#define PHYS_DODGING_TIMEOUT(s) s.cvar_cl_dodging_timeout
+ #define PHYS_DODGING_PRESSED_KEYS(s) CS(s).pressedkeys
#endif
#ifdef SVQC
}
// if the trigger has pressed keys, check that the player is pressing those keys
- if(this.pressedkeys)
- if(IS_PLAYER(toucher)) // only for players
- if(!(toucher.pressedkeys & this.pressedkeys))
+ if(this.pressedkeys && IS_PLAYER(toucher)) // only for players
+ if(!(CS(toucher).pressedkeys & this.pressedkeys))
return;
EXACTTRIGGER_TOUCH(this, toucher);
keys = BITSET(keys, KEY_CROUCH, PHYS_INPUT_BUTTON_CROUCH(this));
keys = BITSET(keys, KEY_ATCK, PHYS_INPUT_BUTTON_ATCK(this));
keys = BITSET(keys, KEY_ATCK2, PHYS_INPUT_BUTTON_ATCK2(this));
- this.pressedkeys = keys; // store for other users
+ CS(this).pressedkeys = keys; // store for other users
STAT(PRESSED_KEYS, this) = keys;
}
ATTRIB(Client, killindicator_teamchange, int, this.killindicator_teamchange);
ATTRIB(Client, idlekick_lasttimeleft, float, this.idlekick_lasttimeleft);
ATTRIB(Client, pm_frametime, float, this.pm_frametime);
+ ATTRIB(Client, pressedkeys, int, this.pressedkeys);
METHOD(Client, m_unwind, bool(Client this));