From dc9513ec8da83ad80e52a7e731bebe75c297944d Mon Sep 17 00:00:00 2001 From: Fouks <42526046+Fouks0@users.noreply.github.com> Date: Tue, 27 Nov 2018 23:57:34 +0100 Subject: [PATCH] Prevents cakes and rubber balls to appear early by replacing them by bowling balls Signed-off-by: Fouks <42526046+Fouks0@users.noreply.github.com> --- src/items/powerup_manager.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/items/powerup_manager.cpp b/src/items/powerup_manager.cpp index 596288044..9507f7899 100644 --- a/src/items/powerup_manager.cpp +++ b/src/items/powerup_manager.cpp @@ -602,6 +602,13 @@ PowerupManager::PowerupType PowerupManager::getRandomPowerup(unsigned int pos, } else *n=1; + + // Prevents early explosive items + if (stk_config->ticks2Time(World::getWorld()->getTicksSinceStart()) < 15.) + { + if (powerup == POWERUP_CAKE || powerup == POWERUP_RUBBERBALL) + powerup = POWERUP_BOWLING; + } return (PowerupType)powerup; } // getRandomPowerup