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:
@@ -5,7 +5,7 @@
|
|||||||
#define APP_GENER 0
|
#define APP_GENER 0
|
||||||
#define APP_MAJOR 0
|
#define APP_MAJOR 0
|
||||||
#define APP_MINOR 107
|
#define APP_MINOR 107
|
||||||
#define APP_PATCH 1
|
#define APP_PATCH 2
|
||||||
#define APP_VER_STRING APP_GENER.APP_MAJOR.APP_MINOR.APP_PATCH
|
#define APP_VER_STRING APP_GENER.APP_MAJOR.APP_MINOR.APP_PATCH
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ void LevelInstance::Step(SimTime sdt)
|
|||||||
score -= 1;
|
score -= 1;
|
||||||
break;
|
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;
|
timer -= sdt;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|||||||
Reference in New Issue
Block a user