g_mod_physics CPMA
// these values match CPMA
-sv_gravity 800
+// CPMA uses gravity 800 but the strength of Q3 gravity is frametime-dependent.
+// It also differs slightly between ascending and descending, which we don't attempt to replicate.
+// Modern CPMA has frametime-independent physics that ~match 125fps frametime-dependent.
+// DeFRaG still has frametime-dependent physics and DFWC rules mandate 125fps.
+// 125 * round(800/125) = 750 simulates 125fps Q3 gravity in Xonotic,
+// tested mathematically by k9 and ingame with printf by bones_was_here.
+
+// Jump height:
+// Taking into account the effect of velocity snapping, a general formula for origin.z k frames after jumping can be derived:
+// kT(270 + (round(gT) - GT)/2) - 1/2 k^2 T round(gT)
+// Inputting g=750, T=1/125 and solving on the 45th frame, we find that the jump height in Quake 3 is 48.528 units.
+// Q3 test results: 48.527999872 in every test (at end of frame).
+// Xonotic test results: 48.6 as expected by (270^2)/(2*750) (see: physicsX.cfg)
+
+// Jump distance/duration:
+// The above formula can also be used to calculate that landing in Q3 occurs after 89.93333... 8ms frames,
+// for a duration of 720ms at end of frame, as predicted by (2*270)/750 (see: physicsX.cfg),
+// so the expected distance is 230.4 units at 320ups.
+// Q3 test results: 230.405274 230.405274 230.404723 230.404969 (at end of frame when ONGROUND is set).
+// Xonotic test results: 230.39637 in every test (Xonotic can set ONGROUND earlier in the frame, when the collision occurs).
+
+sv_gravity 750
+
sv_maxspeed 320
sv_maxairspeed 320
sv_stopspeed 100
-sv_accelerate 15
+sv_accelerate 15 // from cpm1_dev_docs
sv_airaccelerate 1
-sv_friction 8
+// The cpm1_dev_docs.zip (only CPMA source code release) used friction 8,
+// but friction is 6 in all ~modern CPMA releases, and in DeFRaG CPM.
+sv_friction 6
edgefriction 1
sv_stepheight 18
sv_jumpvelocity 270
sv_airaccel_sideways_friction 0
sv_airaccel_qw 1
sv_airaccel_qw_stretchfactor 0
-sv_airstopaccelerate 2.5
-sv_airstrafeaccelerate 70
-sv_maxairstrafespeed 30
+sv_airstopaccelerate 2.5 // from cpm1_dev_docs
+sv_airstrafeaccelerate 70 // from cpm1_dev_docs strafeaccelerate
+sv_maxairstrafespeed 30 // from cpm1_dev_docs wishspeed
sv_airstrafeaccel_qw 0
-sv_aircontrol 150
+sv_aircontrol 150 // from cpm1_dev_docs
sv_aircontrol_penalty 0
sv_aircontrol_power 2
sv_aircontrol_backwards 0
sv_friction_on_land 0
sv_friction_slick 0
sv_doublejump 0
-sv_jumpspeedcap_min ""
+// match the downhill ramp jumping behaviour of CPMA
+sv_jumpspeedcap_min 0
sv_jumpspeedcap_max ""
-sv_jumpspeedcap_max_disable_on_ramps 0
+// CPMA has ramp jumping
+sv_jumpspeedcap_max_disable_on_ramps 1
+// FIXME: Q3 teleporters _set_ speed to 400, not cap it
g_teleport_maxspeed 400
-sv_track_canjump 0
+sv_track_canjump 1
sv_gameplayfix_stepdown_maxspeed 0
g_movement_highspeed_q3_compat 1
g_mod_physics Q3
// these values match Quake3
-sv_gravity 800
+// See physicsCPMA.cfg for the source of this sv_gravity setting
+sv_gravity 750
sv_maxspeed 320
sv_maxairspeed 320
sv_stopspeed 100
sv_airaccel_sideways_friction 0
sv_airaccel_qw 1
sv_airaccel_qw_stretchfactor 0
-sv_airstopaccelerate 0
-sv_airstrafeaccelerate 0
+// Q3A doesn't have airstopaccelerate and strafeaccelerate
+// but they're added in cpm1_dev_docs.zip with values 1 and 1 in VQ3 mode
+sv_airstopaccelerate 1
+sv_airstrafeaccelerate 1
sv_maxairstrafespeed 0
sv_airstrafeaccel_qw 0
sv_aircontrol 0
sv_friction_slick 0
sv_doublejump 0
sv_jumpspeedcap_min ""
-sv_jumpspeedcap_max ""
+// VQ3 has no ramp jumping
+sv_jumpspeedcap_max 270
sv_jumpspeedcap_max_disable_on_ramps 0
-g_teleport_maxspeed 320
-sv_track_canjump 0
+// FIXME: Q3 teleporters _set_ speed to 400, not cap it
+g_teleport_maxspeed 400
+sv_track_canjump 1
sv_gameplayfix_stepdown_maxspeed 0
-g_movement_highspeed_q3_compat 0
+g_movement_highspeed_q3_compat 1