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"
+set sv_jumpvelocity_crouch 0 "jump height while crouching, set to 0 to use regular jump height"
set sv_precacheplayermodels 1
set sv_precacheweapons 0
set g_physics_xonotic_airspeedlimit_nonqw 900
set g_physics_xonotic_maxspeed 360
set g_physics_xonotic_jumpvelocity 260
+set g_physics_xonotic_jumpvelocity_crouch 0
set g_physics_xonotic_maxairstrafespeed 100
set g_physics_xonotic_maxairspeed 360
set g_physics_xonotic_airstrafeaccelerate 18
set g_physics_nexuiz_airspeedlimit_nonqw 0
set g_physics_nexuiz_maxspeed 400
set g_physics_nexuiz_jumpvelocity 300 "333 to match xonotic physics"
+set g_physics_nexuiz_jumpvelocity_crouch 0 "333 to match xonotic physics"
set g_physics_nexuiz_maxairstrafespeed 0
set g_physics_nexuiz_maxairspeed 220
set g_physics_nexuiz_airstrafeaccelerate 0
set g_physics_quake_airspeedlimit_nonqw 0
set g_physics_quake_maxspeed 320
set g_physics_quake_jumpvelocity 270
+set g_physics_quake_jumpvelocity_crouch 0
set g_physics_quake_maxairstrafespeed 0
set g_physics_quake_maxairspeed 30
set g_physics_quake_airstrafeaccelerate 0
set g_physics_warsow_airspeedlimit_nonqw 0
set g_physics_warsow_maxspeed 320
set g_physics_warsow_jumpvelocity 280
+set g_physics_warsow_jumpvelocity_crouch 0
set g_physics_warsow_maxairstrafespeed 30
set g_physics_warsow_maxairspeed 320
set g_physics_warsow_airstrafeaccelerate 70
set g_physics_defrag_airspeedlimit_nonqw 0
set g_physics_defrag_maxspeed 320
set g_physics_defrag_jumpvelocity 270
+set g_physics_defrag_jumpvelocity_crouch 0
set g_physics_defrag_maxairstrafespeed 30
set g_physics_defrag_maxairspeed 320
set g_physics_defrag_airstrafeaccelerate 70
set g_physics_quake3_airspeedlimit_nonqw 0
set g_physics_quake3_maxspeed 320
set g_physics_quake3_jumpvelocity 270
+set g_physics_quake3_jumpvelocity_crouch 0
set g_physics_quake3_maxairstrafespeed 0
set g_physics_quake3_maxairspeed 320
set g_physics_quake3_airstrafeaccelerate 0
set g_physics_vecxis_airspeedlimit_nonqw 0
set g_physics_vecxis_maxspeed 400
set g_physics_vecxis_jumpvelocity 300 "333 to match xonotic physics"
+set g_physics_vecxis_jumpvelocity_crouch 0 "333 to match xonotic physics"
set g_physics_vecxis_maxairstrafespeed 0
set g_physics_vecxis_maxairspeed 220
set g_physics_vecxis_airstrafeaccelerate 0
set g_physics_quake2_airspeedlimit_nonqw 0
set g_physics_quake2_maxspeed 300
set g_physics_quake2_jumpvelocity 270
+set g_physics_quake2_jumpvelocity_crouch 0
set g_physics_quake2_maxairstrafespeed 0
set g_physics_quake2_maxairspeed 300
set g_physics_quake2_airstrafeaccelerate 0
set g_physics_bones_airspeedlimit_nonqw 0
set g_physics_bones_maxspeed 320
set g_physics_bones_jumpvelocity 270
+set g_physics_bones_jumpvelocity_crouch 0
set g_physics_bones_maxairstrafespeed 30
set g_physics_bones_maxairspeed 320
set g_physics_bones_airstrafeaccelerate 70
set g_physics_overkill_airspeedlimit_nonqw 900
set g_physics_overkill_maxspeed 400
set g_physics_overkill_jumpvelocity 260
+set g_physics_overkill_jumpvelocity_crouch 0
set g_physics_overkill_maxairstrafespeed 100
set g_physics_overkill_maxairspeed 360
set g_physics_overkill_airstrafeaccelerate 24
edgefriction 1
sv_stepheight 18
sv_jumpvelocity 270
+sv_jumpvelocity_crouch 0
sv_wateraccelerate 4
sv_waterfriction 1
sv_airaccel_sideways_friction 0
edgefriction 1
sv_stepheight 34
sv_jumpvelocity 270
+sv_jumpvelocity_crouch 0
sv_wateraccelerate -1
sv_waterfriction -1
sv_airaccel_sideways_friction 0 // breaks strafing?
edgefriction 1
sv_stepheight 34
sv_jumpvelocity 300
+sv_jumpvelocity_crouch 0
sv_wateraccelerate -1
sv_waterfriction -1
sv_airaccel_sideways_friction 0.65
// actually, what we want is 266.6666 for 180bpm
// but 260 takes same amount of frames and is nicer to mappers
sv_jumpvelocity 260
+sv_jumpvelocity_crouch 0
sv_wateraccelerate -1
sv_waterfriction -1
sv_airaccel_sideways_friction 0 // breaks strafing?
// actually, what we want is 266.6666 for 180bpm
// but 260 takes same amount of frames and is nicer to mappers
sv_jumpvelocity 260
+sv_jumpvelocity_crouch 0
sv_wateraccelerate -1
sv_waterfriction -1
sv_airaccel_sideways_friction 0
edgefriction 1 // div0 says no! lol
sv_stepheight 26
sv_jumpvelocity 304
+sv_jumpvelocity_crouch 0
sv_wateraccelerate -1
sv_waterfriction -1
sv_airaccel_sideways_friction 0 // pain in the ass to tweak without screwing up the strafing
edgefriction 1
sv_stepheight 34
sv_jumpvelocity 310
+sv_jumpvelocity_crouch 0
sv_wateraccelerate -1
sv_waterfriction -1
sv_airaccel_sideways_friction 0.35
edgefriction 1
sv_stepheight 34
sv_jumpvelocity 300
+sv_jumpvelocity_crouch 0
sv_wateraccelerate -1
sv_waterfriction -1
sv_airaccel_sideways_friction 0
edgefriction 1
sv_stepheight 34
sv_jumpvelocity 300
+sv_jumpvelocity_crouch 0
sv_wateraccelerate -1
sv_waterfriction -1
sv_airaccel_sideways_friction 0
edgefriction 1
sv_stepheight 34
sv_jumpvelocity 300
+sv_jumpvelocity_crouch 0
sv_wateraccelerate -1
sv_waterfriction -1
sv_airaccel_sideways_friction 0
edgefriction 1
sv_stepheight 34
sv_jumpvelocity 300
+sv_jumpvelocity_crouch 0
sv_wateraccelerate -1
sv_waterfriction -1
sv_airaccel_sideways_friction 0
edgefriction 1
sv_stepheight 34
sv_jumpvelocity 300
+sv_jumpvelocity_crouch 0
sv_wateraccelerate -1
sv_waterfriction -1
sv_airaccel_sideways_friction 0
edgefriction 1
sv_stepheight 34
sv_jumpvelocity 300
+sv_jumpvelocity_crouch 0
sv_wateraccelerate -1
sv_waterfriction -1
sv_airaccel_sideways_friction 0.3
edgefriction 1
sv_stepheight 34
sv_jumpvelocity 300
+sv_jumpvelocity_crouch 0
sv_wateraccelerate -1
sv_waterfriction -1
sv_airaccel_sideways_friction 0.35
edgefriction 1
sv_stepheight 34
sv_jumpvelocity 300
+sv_jumpvelocity_crouch 0
sv_wateraccelerate -1
sv_waterfriction -1
sv_airaccel_sideways_friction 0.35
// actually, what we want is 266.6666 for 180bpm
// but 260 takes same amount of frames and is nicer to mappers
sv_jumpvelocity 260
+sv_jumpvelocity_crouch 0
sv_wateraccelerate -1
sv_waterfriction -1
sv_airaccel_sideways_friction 0
// this is smaller than 112 qu, so a 112 qu high corridor (7 of 8 grid units in
// the 16 grid, and the 8th unit used for wall/floor) just lets a player jump!
sv_jumpvelocity 260
+sv_jumpvelocity_crouch 0
sv_wateraccelerate -1
sv_waterfriction -1
sv_airaccel_sideways_friction 0
edgefriction 1
sv_stepheight 18
sv_jumpvelocity 270
+sv_jumpvelocity_crouch 0
sv_wateraccelerate -1
sv_waterfriction -1
sv_airaccel_sideways_friction 0
edgefriction 1
sv_stepheight 18
sv_jumpvelocity 270
+sv_jumpvelocity_crouch 0
sv_wateraccelerate -1
sv_waterfriction 1
sv_airaccel_sideways_friction 0
edgefriction 1
sv_stepheight 18
sv_jumpvelocity 270
+sv_jumpvelocity_crouch 0
sv_wateraccelerate -1
sv_waterfriction 1
sv_airaccel_sideways_friction 0
edgefriction 1
sv_stepheight 18
sv_jumpvelocity 270
+sv_jumpvelocity_crouch 0
sv_wateraccelerate 4
sv_waterfriction 1
sv_airaccel_sideways_friction 0
edgefriction 1
sv_stepheight 34
sv_jumpvelocity 300
+sv_jumpvelocity_crouch 0
sv_wateraccelerate -1
sv_waterfriction -1
sv_airaccel_sideways_friction 0.8
edgefriction 1
sv_stepheight 34
sv_jumpvelocity 300
+sv_jumpvelocity_crouch 0
sv_wateraccelerate -1
sv_waterfriction -1
sv_airaccel_sideways_friction 0.5
edgefriction 1
sv_stepheight 34
sv_jumpvelocity 300
+sv_jumpvelocity_crouch 0
sv_wateraccelerate -1
sv_waterfriction -1
sv_airaccel_sideways_friction 0.3
edgefriction 1
sv_stepheight 18
sv_jumpvelocity 280
+sv_jumpvelocity_crouch 0
sv_wateraccelerate 10
sv_waterfriction 1
sv_airaccel_sideways_friction 0
edgefriction 1
sv_stepheight 18
sv_jumpvelocity 280
+sv_jumpvelocity_crouch 0
sv_wateraccelerate 10
sv_waterfriction 1
sv_airaccel_sideways_friction 0
edgefriction 1
sv_stepheight 18
sv_jumpvelocity 280
+sv_jumpvelocity_crouch 0
sv_wateraccelerate 10
sv_waterfriction 1
sv_airaccel_sideways_friction 0
// this is smaller than 112 qu, so a 112 qu high corridor (7 of 8 grid units in
// the 16 grid, and the 8th unit used for wall/floor) just lets a player jump!
sv_jumpvelocity 260
+sv_jumpvelocity_crouch 0
sv_wateraccelerate -1
sv_waterfriction -1
sv_airaccel_sideways_friction 0
// actually, what we want is 266.6666 for 180bpm
// but 260 takes same amount of frames and is nicer to mappers
sv_jumpvelocity 260
+sv_jumpvelocity_crouch 0
sv_wateraccelerate -1
sv_waterfriction -1
sv_airaccel_sideways_friction 0
// this is smaller than 112 qu, so a 112 qu high corridor (7 of 8 grid units in
// the 16 grid, and the 8th unit used for wall/floor) just lets a player jump!
sv_jumpvelocity 260
+sv_jumpvelocity_crouch 0
sv_wateraccelerate -1
sv_waterfriction -1
sv_airaccel_sideways_friction 0
sv_stepheight 26
// CPMA: 18
sv_jumpvelocity 270
+sv_jumpvelocity_crouch 0
sv_wateraccelerate 4
sv_waterfriction 1
sv_airaccel_sideways_friction 0
sv_stepheight 26
// CPMA: 18
sv_jumpvelocity 270
+sv_jumpvelocity_crouch 0
sv_wateraccelerate 4
sv_waterfriction 1
sv_airaccel_sideways_friction 0
STAT(MOVEVARS_AIRACCELERATE, this) = Physics_ClientOption(this, "airaccelerate", autocvar_sv_airaccelerate);
STAT(MOVEVARS_AIRSTOPACCELERATE, this) = Physics_ClientOption(this, "airstopaccelerate", autocvar_sv_airstopaccelerate);
STAT(MOVEVARS_JUMPVELOCITY, this) = Physics_ClientOption(this, "jumpvelocity", autocvar_sv_jumpvelocity);
+ STAT(MOVEVARS_JUMPVELOCITY_CROUCH, this) = Physics_ClientOption(this, "jumpvelocity_crouch", autocvar_sv_jumpvelocity_crouch);
STAT(MOVEVARS_TRACK_CANJUMP, this) = Physics_ClientOption(this, "track_canjump", autocvar_sv_track_canjump);
}
#endif
#endif
bool doublejump = false;
- float mjumpheight = PHYS_JUMPVELOCITY(this);
+ float mjumpheight = ((PHYS_JUMPVELOCITY_CROUCH(this) && IS_DUCKED(this)) ? PHYS_JUMPVELOCITY_CROUCH(this) : PHYS_JUMPVELOCITY(this));
bool track_jump = PHYS_CL_TRACK_CANJUMP(this);
if (MUTATOR_CALLHOOK(PlayerJump, this, mjumpheight, doublejump))
#define PHYS_JUMPSPEEDCAP_DISABLE_ONRAMPS(s) STAT(MOVEVARS_JUMPSPEEDCAP_DISABLE_ONRAMPS)
#define PHYS_JUMPVELOCITY(s) STAT(MOVEVARS_JUMPVELOCITY, s)
+#define PHYS_JUMPVELOCITY_CROUCH(s) STAT(MOVEVARS_JUMPVELOCITY_CROUCH, s)
#define PHYS_MAXAIRSPEED(s) STAT(MOVEVARS_MAXAIRSPEED, s)
#define PHYS_MAXAIRSTRAFESPEED(s) STAT(MOVEVARS_MAXAIRSTRAFESPEED, s)
// FIXME: Was 0 on server, 1 on client. Still want that?
REGISTER_STAT(MOVEVARS_ENTGRAVITY, float, (this.gravity) ? this.gravity : 1)
REGISTER_STAT(MOVEVARS_JUMPVELOCITY, float)
+REGISTER_STAT(MOVEVARS_JUMPVELOCITY_CROUCH, float)
REGISTER_STAT(MOVEVARS_MAXAIRSPEED, float)
REGISTER_STAT(MOVEVARS_STEPHEIGHT, float, autocvar_sv_stepheight)
REGISTER_STAT(MOVEVARS_AIRACCEL_QW, float)
float autocvar_sv_jumpspeedcap_max_disable_on_ramps;
string autocvar_sv_jumpspeedcap_min;
float autocvar_sv_jumpvelocity;
+float autocvar_sv_jumpvelocity_crouch;
bool autocvar_sv_logscores_bots;
bool autocvar_sv_logscores_console;
bool autocvar_sv_logscores_file;