]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 63aa3dd955716971d60c1c7c794cf7ee5a4ad6b1..7894d14fd856bb1a8e09a4401fd88259ee940320 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;