Limit the maximum number of physics iterations in a frame to 32 to match engine's...
authorMario <mario.mario@y7mail.com>
Sun, 24 May 2020 18:17:24 +0000 (18:17 +0000)
committerterencehill <piuntn@gmail.com>
Sun, 24 May 2020 18:17:24 +0000 (18:17 +0000)
qcsrc/common/physics/movetypes/movetypes.qc

index 63aa3dd..7894d14 100644 (file)
@@ -747,7 +747,7 @@ void Movetype_Physics_MatchTicrate(entity this, float tr, bool sloppy)  // SV_Ph
 
        float dt = time - this.move_time;
 
-       int n = max(0, floor(dt / tr));
+       int n = bound(0, floor(dt / tr), 32); // limit the number of frames to 32 (CL_MAX_USERCMDS, using DP_SMALLMEMORY value for consideration of QC's limitations)
        dt -= n * tr;
        this.move_time += n * tr;