]> git.jsancho.org Git - lugaru.git/blobdiff - Source/GameTick.cpp
Fixes #40 Scores are now integers
[lugaru.git] / Source / GameTick.cpp
index 9844ff0e9c89e8a446c00d6ef4e50fd241603eeb..69f9d04ce53ff8fbfba1630fabb5024e93a55818 100644 (file)
@@ -3209,7 +3209,12 @@ void Game::Tick()
                 if (Tutorial::active) {
                     bonusvalue = 0;
                 }
-                bonusvalue /= bonusnum[bonus];
+                if (bonusvalue > 0) {
+                    bonusvalue /= bonusnum[bonus];
+                    if (bonusvalue <= 0) {
+                        bonusvalue = 0;
+                    }
+                }
                 bonustotal += bonusvalue;
             }
             bonustime += multiplier;