From be39fc4f96f345a11a81bd8e1c9a91074a6e1a3c Mon Sep 17 00:00:00 2001 From: Flakebi Date: Wed, 4 Jun 2014 19:06:45 +0200 Subject: [PATCH] Reset speed when porting to a challenge --- src/modes/overworld.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modes/overworld.cpp b/src/modes/overworld.cpp index 216a0b8aa..667b54e28 100644 --- a/src/modes/overworld.cpp +++ b/src/modes/overworld.cpp @@ -29,6 +29,7 @@ #include "karts/kart_properties.hpp" #include "karts/kart_properties_manager.hpp" #include "karts/rescue_animation.hpp" +#include "physics/btKart.hpp" #include "physics/physics.hpp" #include "states_screens/dialogs/select_challenge.hpp" #include "states_screens/offline_kart_selection.hpp" @@ -54,7 +55,6 @@ OverWorld::~OverWorld() /** Function to simplify the start process */ void OverWorld::enterOverWorld() { - race_manager->setNumLocalPlayers(1); race_manager->setMajorMode (RaceManager::MAJOR_MODE_SINGLE); race_manager->setMinorMode (RaceManager::MINOR_MODE_OVERWORLD); @@ -231,6 +231,7 @@ void OverWorld::onMouseClick(int x, int y) // be the location of the challenge bubble. AbstractKart* kart = getKart(0); kart->setXYZ(challenge->m_position); + kart->getVehicle()->capSpeed(0); unsigned int index = getRescuePositionIndex(kart); btTransform s = getRescueTransform(index);