X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGameTick.cpp;h=81780500ffa30acba2823aca35dd58d7d7d24fb1;hb=0aab437dc560d2afa982e61cc2547756ad7b0761;hp=9844ff0e9c89e8a446c00d6ef4e50fd241603eeb;hpb=b9a46d8e2b7e7e22c706e7dd3734f31015db4408;p=lugaru.git diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index 9844ff0..8178050 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -1,6 +1,6 @@ /* Copyright (C) 2003, 2010 - Wolfire Games -Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file) +Copyright (C) 2010-2017 - Lugaru contributors (see AUTHORS file) This file is part of Lugaru. @@ -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;