From: Mario Date: Sun, 24 May 2020 18:17:24 +0000 (+0000) Subject: Limit the maximum number of physics iterations in a frame to 32 to match engine's... X-Git-Tag: xonotic-v0.8.5~1031^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7e77d8efd080990fc742665f152dd259d0d65b6c;p=xonotic%2Fxonotic-data.pk3dir.git Limit the maximum number of physics iterations in a frame to 32 to match engine's CL_MAX_USERCMDS, possible fix for the casing disconnect issue --- diff --git a/qcsrc/common/physics/movetypes/movetypes.qc b/qcsrc/common/physics/movetypes/movetypes.qc index 63aa3dd95..7894d14fd 100644 --- a/qcsrc/common/physics/movetypes/movetypes.qc +++ b/qcsrc/common/physics/movetypes/movetypes.qc @@ -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;