From d25f4a6ba2582e2aa39d1a7d19734a929b8084a0 Mon Sep 17 00:00:00 2001 From: NT_x86 Date: Fri, 7 Oct 2022 12:10:24 +0300 Subject: [PATCH] Fix the timer going into the negatives when the game is running slowly --- src/source/DataModelV2/LevelInstance.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/source/DataModelV2/LevelInstance.cpp b/src/source/DataModelV2/LevelInstance.cpp index 4b33578..08a25cc 100644 --- a/src/source/DataModelV2/LevelInstance.cpp +++ b/src/source/DataModelV2/LevelInstance.cpp @@ -217,7 +217,7 @@ void LevelInstance::Step(SimTime sdt) score -= 1; break; } - if (timer >= 0.1f){ //Due to timing used this could cause the number go into negatives for one step + if (timer >= sdt){ timer -= sdt; } else{