- fixed comparison.

The timer reset must also occur when the values are equal, meaning they got set during the same millisecond.
This commit is contained in:
Christoph Oelckers 2017-11-15 18:02:41 +01:00
parent ab32cb4c88
commit 16fa0cba21

View file

@ -122,7 +122,7 @@ bool FRenderState::ApplyShader()
static uint64_t firstFrame = 0; static uint64_t firstFrame = 0;
// if firstFrame is not yet initialized, initialize it to current time // if firstFrame is not yet initialized, initialize it to current time
// if we're going to overflow a float (after ~4.6 hours, or 24 bits), re-init to regain precision // if we're going to overflow a float (after ~4.6 hours, or 24 bits), re-init to regain precision
if ((firstFrame == 0) || (screen->FrameTime - firstFrame >= 1<<24) || level.ShaderStartTime > firstFrame) if ((firstFrame == 0) || (screen->FrameTime - firstFrame >= 1<<24) || level.ShaderStartTime >= firstFrame)
firstFrame = screen->FrameTime; firstFrame = screen->FrameTime;
static const float nulvec[] = { 0.f, 0.f, 0.f, 0.f }; static const float nulvec[] = { 0.f, 0.f, 0.f, 0.f };