From f33cdb2d17a110954c291dafbd8ec8af73803b93 Mon Sep 17 00:00:00 2001 From: hikerstk Date: Mon, 12 Dec 2011 03:49:33 +0000 Subject: [PATCH] Final fix for #528 (see also r10404): don't test for locked karts when using --ai. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10405 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/race/race_manager.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/race/race_manager.cpp b/src/race/race_manager.cpp index 632215498..71a44275f 100644 --- a/src/race/race_manager.cpp +++ b/src/race/race_manager.cpp @@ -101,12 +101,15 @@ void RaceManager::setDefaultAIKartList(const std::vector& ai_list) name.c_str()); continue; } - if(unlock_manager->getCurrentSlot()->isLocked(name)) - { - printf("Kart '%s' is locked and therefore ignored.\n", - name.c_str()); - continue; - } + // This doesn't work anymore, since this is called when + // handling the command line options, at which time the + // player (and therefore the current slot) is not defined yet. + //if(unlock_manager->getCurrentSlot()->isLocked(name)) + //{ + // printf("Kart '%s' is locked and therefore ignored.\n", + // name.c_str()); + // continue; + //} m_default_ai_list.push_back(name); } } // setAIKartList