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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user