mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-15 07:00:58 +00:00
Fix playDemo running as fast as possible (like timeDemo).
This commit is contained in:
parent
ca0527f9a6
commit
5368af9ad8
1 changed files with 6 additions and 1 deletions
|
@ -610,7 +610,8 @@ void idCommonLocal::Frame()
|
|||
gameTimeResidual += clampedDeltaMilliseconds * timescale.GetFloat();
|
||||
|
||||
// don't run any frames when paused
|
||||
if( pauseGame )
|
||||
// jpcy: the game is paused when playing a demo, but playDemo should wait like the game does
|
||||
if( pauseGame && !( readDemo && !timeDemo ) )
|
||||
{
|
||||
gameFrame++;
|
||||
gameTimeResidual = 0;
|
||||
|
@ -674,6 +675,10 @@ void idCommonLocal::Frame()
|
|||
Sys_Sleep( 0 );
|
||||
}
|
||||
|
||||
// jpcy: playDemo uses the game frame wait logic, but shouldn't run any game frames
|
||||
if( readDemo && !timeDemo )
|
||||
numGameFrames = 0;
|
||||
|
||||
//--------------------------------------------
|
||||
// It would be better to push as much of this as possible
|
||||
// either before or after the renderSystem->SwapCommandBuffers(),
|
||||
|
|
Loading…
Reference in a new issue