From 8b07ec755a0ac57b2b6d86f2bc6a82d6d147a1e9 Mon Sep 17 00:00:00 2001 From: Benau Date: Fri, 3 Aug 2018 01:28:20 +0800 Subject: [PATCH] Disable switch and bubblegum for now in network --- src/items/powerup.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/items/powerup.cpp b/src/items/powerup.cpp index cd7a91f5b..b9b1fa062 100644 --- a/src/items/powerup.cpp +++ b/src/items/powerup.cpp @@ -32,6 +32,7 @@ #include "karts/controller/controller.hpp" #include "karts/kart_properties.hpp" #include "modes/world.hpp" +#include "network/network_config.hpp" #include "network/rewind_manager.hpp" #include "physics/triangle_mesh.hpp" #include "tracks/track.hpp" @@ -567,6 +568,11 @@ void Powerup::hitBonusBox(const ItemState &item_state) new_powerup = powerup_manager->getRandomPowerup(position, &n, random_number); + // FIXME Disable switch and bubblegum for now in network + if (NetworkConfig::get()->isNetworking() && + (new_powerup == PowerupManager::POWERUP_BUBBLEGUM || + new_powerup == PowerupManager::POWERUP_SWITCH)) + new_powerup = PowerupManager::POWERUP_BOWLING; // Always add a new powerup in ITEM_MODE_NEW (or if the kart // doesn't have a powerup atm).