Added --gp option to start a GP from the command line.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5707 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
9f488329aa
commit
47070a2f5a
@ -82,6 +82,7 @@ void cmdLineHelp (char* invocation)
|
||||
"Options:\n"
|
||||
" -N, --no-start-screen Immediatgely start race without showing a menu.\n"
|
||||
" -t, --track NAME Start at track NAME (see --list-tracks).\n"
|
||||
" --gp name Start the specified Grand Prix."
|
||||
" --stk-config FILE use ./data/FILE instead of ./data/stk_config.xml\n"
|
||||
" -l, --list-tracks Show available tracks.\n"
|
||||
" -k, --numkarts NUM Number of karts on the racetrack.\n"
|
||||
@ -334,6 +335,13 @@ int handleCmdLine(int argc, char **argv)
|
||||
}
|
||||
i++;
|
||||
}
|
||||
else if( (!strcmp(argv[i], "--gp")) && i+1<argc)
|
||||
{
|
||||
race_manager->setMajorMode(RaceManager::MAJOR_MODE_GRAND_PRIX);
|
||||
const GrandPrixData *gp = grand_prix_manager->getGrandPrix(argv[i+1]);
|
||||
race_manager->setGrandPrix(*gp);
|
||||
i++;
|
||||
}
|
||||
else if( (!strcmp(argv[i], "--stk-config")) && i+1<argc )
|
||||
{
|
||||
stk_config->load(file_manager->getConfigFile(argv[i+1]));
|
||||
|
Loading…
Reference in New Issue
Block a user