From e64c2350d0b8259fddaa3383d8aad5f6d682fe00 Mon Sep 17 00:00:00 2001 From: aurhat Date: Fri, 5 Jun 2015 13:37:25 +0200 Subject: [PATCH] Increase speed of rewind The commit increases very much speed of demo rewind and also prevents AC freeze for gamespeed = 1000. It may degrade physics for gamespeed = 1000 on very low end machines. --- source/src/physics.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/src/physics.cpp b/source/src/physics.cpp index 696f05a4..564987a6 100644 --- a/source/src/physics.cpp +++ b/source/src/physics.cpp @@ -755,6 +755,7 @@ void physicsframe() // optimally schedule physics frames inside the gra physframetime = clamp((PHYSFRAMETIME*gamespeed)/100, 1, PHYSFRAMETIME); physsteps = (diff + physframetime - 1)/physframetime; lastphysframe += physsteps * physframetime; + if(!multiplayer(false) && physsteps > 1000) physsteps = 1000; } }