Avoid an assertion error if previously a local race with AI
was done (then #ai karts + player karts != num_karts in race manager).
This commit is contained in:
parent
9897a497f5
commit
969f938dce
@ -69,7 +69,10 @@ void LobbyProtocol::loadWorld()
|
|||||||
StateManager::ActivePlayer *ap = race_manager->getNumLocalPlayers()>1
|
StateManager::ActivePlayer *ap = race_manager->getNumLocalPlayers()>1
|
||||||
? NULL
|
? NULL
|
||||||
: StateManager::get()->getActivePlayer(0);
|
: StateManager::get()->getActivePlayer(0);
|
||||||
|
// Reset the ai kart list in the race manager, otherwise in network race
|
||||||
|
// we can get an assertion if previously a local race with AI was done
|
||||||
|
std::vector<std::string> ai_kart_list;
|
||||||
|
race_manager->setAIKartList(ai_kart_list);
|
||||||
input_manager->getDeviceManager()->setSinglePlayer(ap);
|
input_manager->getDeviceManager()->setSinglePlayer(ap);
|
||||||
|
|
||||||
// Load the actual world.
|
// Load the actual world.
|
||||||
|
Loading…
Reference in New Issue
Block a user