Merge remote-tracking branch 'fouks/prevent-early-explosive-items' into voting_gui

This commit is contained in:
Benau 2018-12-22 10:06:47 +08:00
commit 3292c8f0c3

View File

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