Merge pull request #105 from Vulpovile/bugfix-negativetimer

Fix the timer going into the negatives when the game is running slowly
This commit is contained in:
Vulpovile
2022-10-07 10:47:09 -07:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -5,7 +5,7 @@
#define APP_GENER 0
#define APP_MAJOR 0
#define APP_MINOR 107
#define APP_PATCH 1
#define APP_PATCH 2
#define APP_VER_STRING APP_GENER.APP_MAJOR.APP_MINOR.APP_PATCH

View File

@@ -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{