From 14aa2463375fe398ac83100b2aa1fbc0748e84fa Mon Sep 17 00:00:00 2001 From: auria Date: Sat, 13 Dec 2008 16:37:27 +0000 Subject: [PATCH] parachutes and anvils were given without asking the World object if they made sense in this game. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2666 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/items/powerup.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/items/powerup.cpp b/src/items/powerup.cpp index d7fe6d15c..2c1a6bb56 100644 --- a/src/items/powerup.cpp +++ b/src/items/powerup.cpp @@ -218,7 +218,9 @@ void Powerup::hitBonusBox(int n, const Item &item, int add_info) //The probabilities of getting the anvil or the parachute increase //depending on how bad the owner's position is. For the first //driver the posibility is none, for the last player is 15 %. - if(m_owner->getPosition() != 1 && m_type == POWERUP_NOTHING) + if(m_owner->getPosition() != 1 && m_type == POWERUP_NOTHING && + race_manager->getWorld()->acceptPowerup(POWERUP_PARACHUTE) && + race_manager->getWorld()->acceptPowerup(POWERUP_ANVIL)) { // On client: just set the value if(network_manager->getMode()==NetworkManager::NW_CLIENT)