addstat(STAT_JETPACK_FUEL, AS_FLOAT, stat_jetpack_fuel);
addstat(STAT_JETPACK_MAXSPEED_UP, AS_FLOAT, stat_jetpack_maxspeed_up);
addstat(STAT_JETPACK_MAXSPEED_SIDE, AS_FLOAT, stat_jetpack_maxspeed_side);
+
+ // hack to fix track_canjump
+ addstat(STAT_MOVEVARS_TRACK_CANJUMP, AS_INT, cvar_cl_movement_track_canjump);
}
void Physics_UpdateStats(float maxspd_mod)
if (!IS_ONGROUND(self))
return;
- if (self.cvar_cl_movement_track_canjump)
+ if (PHYS_TRACK_CANJUMP(self))
if (IS_JUMP_HELD(self))
return;
{
pm_multijump = FALSE;
PM_multijump_checkjump();
- if((IS_ONGROUND(self) || pm_multijump) && (!IS_JUMP_HELD(self) || !cvar("cl_movement_track_canjump")))
+ if((IS_ONGROUND(self) || pm_multijump) && (!IS_JUMP_HELD(self) || !PHYS_TRACK_CANJUMP(self)))
{
self.velocity_z += PHYS_JUMPVELOCITY;
UNSET_ONGROUND(self);
#define PHYS_FROZEN(s) getstati(STAT_FROZEN)
+ #define PHYS_TRACK_CANJUMP(s) getstati(STAT_MOVEVARS_TRACK_CANJUMP)
#define PHYS_ACCELERATE getstatf(STAT_MOVEVARS_ACCELERATE)
#define PHYS_AIRACCEL_QW(s) getstatf(STAT_MOVEVARS_AIRACCEL_QW)
#define PHYS_AIRACCEL_QW_STRETCHFACTOR(s) getstatf(STAT_MOVEVARS_AIRACCEL_QW_STRETCHFACTOR)
#define PHYS_FROZEN(s) s.frozen
+ #define PHYS_TRACK_CANJUMP(s) s.cvar_cl_movement_track_canjump
#define PHYS_ACCELERATE autocvar_sv_accelerate
#define PHYS_AIRACCEL_QW(s) s.stat_sv_airaccel_qw
#define PHYS_AIRACCEL_QW_STRETCHFACTOR(s) autocvar_sv_airaccel_qw_stretchfactor
// 194 empty?
// 195 empty?
// 196 empty?
-// 197 empty?
+const float STAT_MOVEVARS_TRACK_CANJUMP = 197;
const float STAT_MULTIJUMP_ADD = 198;
const float STAT_MULTIJUMP_SPEED = 199;
const float STAT_MULTIJUMP = 200;