Added a debug option to skip the ready-set-go phase
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9168 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
4b39be6f83
commit
1c2795f0c8
@ -375,6 +375,8 @@ namespace UserConfigParams
|
||||
PARAM_PREFIX int m_verbosity PARAM_DEFAULT( 0 );
|
||||
|
||||
PARAM_PREFIX bool m_no_start_screen PARAM_DEFAULT( false );
|
||||
|
||||
PARAM_PREFIX bool m_race_now PARAM_DEFAULT( false );
|
||||
|
||||
/** True to test funky ambient/diffuse/specularity in RGB & all anisotropic */
|
||||
PARAM_PREFIX bool m_rendering_debug PARAM_DEFAULT( false );
|
||||
|
@ -236,6 +236,7 @@ void cmdLineHelp (char* invocation)
|
||||
" the Tux and friends.\n\n"
|
||||
"Options:\n"
|
||||
" -N, --no-start-screen Immediately start race without showing a menu.\n"
|
||||
" -R, --race-now Same as -N but also skip the ready-set-go phase and the music.\n"
|
||||
" -t, --track NAME Start at track NAME (see --list-tracks).\n"
|
||||
" --gp name Start the specified Grand Prix.\n"
|
||||
" --stk-config FILE use ./data/FILE instead of ./data/stk_config.xml\n"
|
||||
@ -669,6 +670,12 @@ int handleCmdLine(int argc, char **argv)
|
||||
//fprintf ( stdout, "Enabling reverse mode.\n" ) ;
|
||||
//raceSetup.reverse = 1;
|
||||
}
|
||||
else if ( !strcmp(argv[i], "--race-now")
|
||||
|| !strcmp(argv[i], "-R") )
|
||||
{
|
||||
UserConfigParams::m_no_start_screen = true;
|
||||
UserConfigParams::m_race_now = true;
|
||||
}
|
||||
else if ( !strcmp(argv[i], "--laps") && i+1<argc )
|
||||
{
|
||||
fprintf ( stdout, "You choose to have %d laps.\n", atoi(argv[i+1]) ) ;
|
||||
|
@ -33,7 +33,7 @@ WorldStatus::WorldStatus()
|
||||
m_clock_mode = CLOCK_CHRONO;
|
||||
m_time = 0.0f;
|
||||
m_auxiliary_timer = 0.0f;
|
||||
m_phase = SETUP_PHASE;
|
||||
m_phase = UserConfigParams::m_race_now ? RACE_PHASE : SETUP_PHASE;
|
||||
m_previous_phase = UNDEFINED_PHASE; // initialise it just in case
|
||||
|
||||
m_prestart_sound = sfx_manager->createSoundSource("pre_start_race");
|
||||
@ -52,7 +52,7 @@ void WorldStatus::reset()
|
||||
m_auxiliary_timer = 0.0f;
|
||||
// Using SETUP_PHASE will play the track into sfx first, and has no
|
||||
// other side effects.
|
||||
m_phase = SETUP_PHASE;
|
||||
m_phase = UserConfigParams::m_race_now ? RACE_PHASE : SETUP_PHASE;
|
||||
m_previous_phase = UNDEFINED_PHASE;
|
||||
// Just in case that the game is reset during the intro phase
|
||||
m_track_intro_sound->stop();
|
||||
|
Loading…
Reference in New Issue
Block a user