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
This commit is contained in:
auria 2008-12-13 16:37:27 +00:00
parent 95879bb0a1
commit 14aa246337

View File

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