set sv_jumpspeedcap_min "" "lower bound on the baseline velocity of a jump; final velocity will be >= (jumpheight * min + jumpheight)"
set sv_jumpspeedcap_max "" "upper bound on the baseline velocity of a jump; final velocity will be <= (jumpheight * max + jumpheight)"
set sv_jumpspeedcap_max_disable_on_ramps 0 "disable upper baseline velocity bound on ramps to preserve the old rampjump style"
+set sv_track_canjump 0 "track if the player released the jump key between 2 jumps to decide if they are able to jump or not"
seta sv_precacheplayermodels 1
seta sv_precacheweapons 0
set g_physics_xonotic_stopspeed 100
set g_physics_xonotic_airaccelerate 2
set g_physics_xonotic_airstopaccelerate 3
+set g_physics_xonotic_track_canjump 0
// ========
// Nexuiz
set g_physics_nexuiz_stopspeed 100
set g_physics_nexuiz_airaccelerate 5.5
set g_physics_nexuiz_airstopaccelerate 0
+set g_physics_nexuiz_track_canjump 0
// =======
// Quake
set g_physics_quake_stopspeed 100
set g_physics_quake_airaccelerate 106.66666666666666666666
set g_physics_quake_airstopaccelerate 0
+set g_physics_quake_track_canjump 1
// ========
// Warsow
set g_physics_warsow_stopspeed 100
set g_physics_warsow_airaccelerate 1
set g_physics_warsow_airstopaccelerate 2.5
+set g_physics_warsow_track_canjump 0
// ========
// DeFrag
set g_physics_defrag_stopspeed 100
set g_physics_defrag_airaccelerate 1
set g_physics_defrag_airstopaccelerate 2.5
+set g_physics_defrag_track_canjump 0
// =========
// Quake 3
set g_physics_quake3_stopspeed 100
set g_physics_quake3_airaccelerate 1
set g_physics_quake3_airstopaccelerate 0
+set g_physics_quake3_track_canjump 1
// ========
// Vecxis
set g_physics_vecxis_stopspeed 100
set g_physics_vecxis_airaccelerate 5.5
set g_physics_vecxis_airstopaccelerate 0
+set g_physics_vecxis_track_canjump 0
// =========
// Quake 2
set g_physics_quake2_stopspeed 100
set g_physics_quake2_airaccelerate 1
set g_physics_quake2_airstopaccelerate 0
+set g_physics_quake2_track_canjump 1
// =======
// Bones
set g_physics_bones_stopspeed 100
set g_physics_bones_airaccelerate 1
set g_physics_bones_airstopaccelerate 2.5
+set g_physics_bones_track_canjump 0
sv_jumpspeedcap_max ""
sv_jumpspeedcap_max_disable_on_ramps 0
g_teleport_maxspeed 400
+sv_track_canjump 0
sv_jumpspeedcap_max 0.35
sv_jumpspeedcap_max_disable_on_ramps 1
g_teleport_maxspeed 0
+sv_track_canjump 0
sv_jumpspeedcap_max ""
sv_jumpspeedcap_max_disable_on_ramps 0
g_teleport_maxspeed 0
+sv_track_canjump 0
sv_jumpspeedcap_max ""
sv_jumpspeedcap_max_disable_on_ramps 1
g_teleport_maxspeed 0
+sv_track_canjump 0
sv_jumpspeedcap_max ""
sv_jumpspeedcap_max_disable_on_ramps 1
g_teleport_maxspeed 0
+sv_track_canjump 0
sv_jumpspeedcap_max 0.38
sv_jumpspeedcap_max_disable_on_ramps 0
g_teleport_maxspeed 0
+sv_track_canjump 0
sv_jumpspeedcap_max ""
sv_jumpspeedcap_max_disable_on_ramps 0
g_teleport_maxspeed 0
+sv_track_canjump 0
sv_jumpspeedcap_max ""
sv_jumpspeedcap_max_disable_on_ramps 0
g_teleport_maxspeed 0
+sv_track_canjump 0
sv_jumpspeedcap_max ""
sv_jumpspeedcap_max_disable_on_ramps 0
g_teleport_maxspeed 0
+sv_track_canjump 0
sv_jumpspeedcap_max ""
sv_jumpspeedcap_max_disable_on_ramps 0
g_teleport_maxspeed 0
+sv_track_canjump 0
sv_jumpspeedcap_max ""
sv_jumpspeedcap_max_disable_on_ramps 0
g_teleport_maxspeed 0
+sv_track_canjump 0
sv_jumpspeedcap_max ""
sv_jumpspeedcap_max_disable_on_ramps 0
g_teleport_maxspeed 0
+sv_track_canjump 0
sv_jumpspeedcap_max ""
sv_jumpspeedcap_max_disable_on_ramps 0
g_teleport_maxspeed 0
+sv_track_canjump 0
sv_jumpspeedcap_max ""
sv_jumpspeedcap_max_disable_on_ramps 0
g_teleport_maxspeed 0
+sv_track_canjump 0
sv_jumpspeedcap_max ""
sv_jumpspeedcap_max_disable_on_ramps 0
g_teleport_maxspeed 0
+sv_track_canjump 0
sv_jumpspeedcap_max ""
sv_jumpspeedcap_max_disable_on_ramps 1
g_teleport_maxspeed 0
+sv_track_canjump 0
sv_jumpspeedcap_max ""
sv_jumpspeedcap_max_disable_on_ramps 0
g_teleport_maxspeed 0
+sv_track_canjump 0
sv_jumpspeedcap_max ""
sv_jumpspeedcap_max_disable_on_ramps 0
g_teleport_maxspeed 0
+sv_track_canjump 0
sv_jumpspeedcap_max ""
sv_jumpspeedcap_max_disable_on_ramps 0
g_teleport_maxspeed 0
+sv_track_canjump 0
sv_jumpspeedcap_max ""
sv_jumpspeedcap_max_disable_on_ramps 0
g_teleport_maxspeed 320
+sv_track_canjump 0
sv_jumpspeedcap_max ""
sv_jumpspeedcap_max_disable_on_ramps 0
g_teleport_maxspeed 0
+sv_track_canjump 0
sv_jumpspeedcap_max ""
sv_jumpspeedcap_max_disable_on_ramps 0
g_teleport_maxspeed 0
+sv_track_canjump 0
sv_jumpspeedcap_max ""
sv_jumpspeedcap_max_disable_on_ramps 0
g_teleport_maxspeed 0
+sv_track_canjump 0
sv_jumpspeedcap_max ""
sv_jumpspeedcap_max_disable_on_ramps 0
g_teleport_maxspeed 0
+sv_track_canjump 0
sv_jumpspeedcap_max ""
sv_jumpspeedcap_max_disable_on_ramps 0
g_teleport_maxspeed 0
+sv_track_canjump 0
sv_jumpspeedcap_max ""
sv_jumpspeedcap_max_disable_on_ramps 0
g_teleport_maxspeed 0
+sv_track_canjump 0
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);
+ addstat(STAT_MOVEVARS_CL_TRACK_CANJUMP, AS_INT, cvar_cl_movement_track_canjump);
+ addstat(STAT_MOVEVARS_TRACK_CANJUMP, AS_INT, stat_sv_track_canjump);
// double jump
addstat(STAT_DOUBLEJUMP, AS_INT, stat_doublejump);
self.stat_sv_airstopaccelerate = Physics_ClientOption(self, "airstopaccelerate");
self.stat_sv_jumpvelocity = Physics_ClientOption(self, "jumpvelocity");
+ self.stat_sv_track_canjump = Physics_ClientOption(self, "track_canjump");
+
self.stat_gameplayfix_upvelocityclearsonground = UPWARD_VELOCITY_CLEARS_ONGROUND;
}
#endif
if (!IS_ONGROUND(self))
return IS_JUMP_HELD(self);
- if (PHYS_TRACK_CANJUMP(self))
+ bool track_jump = PHYS_CL_TRACK_CANJUMP(self);
+ if(PHYS_TRACK_CANJUMP(self))
+ track_jump = true;
+
+ if (track_jump)
if (IS_JUMP_HELD(self))
return true;
#define PHYS_JUMPSPEEDCAP_MAX cvar_string("cl_jumpspeedcap_max")
#define PHYS_JUMPSPEEDCAP_DISABLE_ONRAMPS getstati(STAT_MOVEVARS_JUMPSPEEDCAP_DISABLE_ONRAMPS)
+ #define PHYS_CL_TRACK_CANJUMP(s) getstati(STAT_MOVEVARS_CL_TRACK_CANJUMP)
#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)
.float stat_nostep;
.float stat_jumpstep;
+ .bool stat_sv_track_canjump;
+
#define PHYS_INPUT_ANGLES(s) s.v_angle
#define PHYS_WORLD_ANGLES(s) s.angles
#define PHYS_JUMPSPEEDCAP_MAX autocvar_sv_jumpspeedcap_max
#define PHYS_JUMPSPEEDCAP_DISABLE_ONRAMPS autocvar_sv_jumpspeedcap_max_disable_on_ramps
- #define PHYS_TRACK_CANJUMP(s) s.cvar_cl_movement_track_canjump
+ #define PHYS_CL_TRACK_CANJUMP(s) s.cvar_cl_movement_track_canjump
+ #define PHYS_TRACK_CANJUMP(s) s.stat_sv_track_canjump
#define PHYS_ACCELERATE self.stat_sv_accelerate
#define PHYS_AIRACCEL_QW(s) s.stat_sv_airaccel_qw
#define PHYS_AIRACCEL_QW_STRETCHFACTOR(s) self.stat_sv_airaccel_qw_stretchfactor
const int STAT_MOVEVARS_FRICTION_SLICK = 191;
const int STAT_MOVEVARS_FRICTION_ONLAND = 192;
const int STAT_MOVEVARS_JUMPSPEEDCAP_DISABLE_ONRAMPS = 193;
-// 194 empty?
+const int STAT_MOVEVARS_TRACK_CANJUMP = 194;
// 195 empty?
const int STAT_DOUBLEJUMP = 196;
-const int STAT_MOVEVARS_TRACK_CANJUMP = 197;
+const int STAT_MOVEVARS_CL_TRACK_CANJUMP = 197;
const int STAT_MULTIJUMP_ADD = 198;
const int STAT_MULTIJUMP_SPEED = 199;
const int STAT_MULTIJUMP = 200;