Keep the race going (with end race controller) while the race
results are shown. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5704 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
9de958aa17
commit
e291ce56ff
@ -400,8 +400,8 @@ void World::updateWorld(float dt)
|
||||
{
|
||||
// Don't update world if a menu is shown or the race is over.
|
||||
if( m_phase == FINISH_PHASE ||
|
||||
m_phase == RESULT_DISPLAY_PHASE ||
|
||||
m_phase == IN_GAME_MENU_PHASE ) return;
|
||||
m_phase == IN_GAME_MENU_PHASE )
|
||||
return;
|
||||
|
||||
update(dt);
|
||||
if( (!isFinishPhase()) && isRaceOver())
|
||||
|
@ -85,10 +85,11 @@ void WorldStatus::setClockMode(const ClockType mode, const float initial_time)
|
||||
*/
|
||||
void WorldStatus::enterRaceOverState()
|
||||
{
|
||||
// Don't
|
||||
// Don't enter race over if it's already race over
|
||||
if( m_phase == DELAY_FINISH_PHASE
|
||||
|| m_phase == RESULT_DISPLAY_PHASE
|
||||
|| m_phase == FINISH_PHASE ) return;
|
||||
|| m_phase == FINISH_PHASE )
|
||||
return;
|
||||
|
||||
m_phase = DELAY_FINISH_PHASE;
|
||||
m_auxiliary_timer = 0.0f;
|
||||
@ -183,11 +184,17 @@ void WorldStatus::update(const float dt)
|
||||
break;
|
||||
}
|
||||
case RESULT_DISPLAY_PHASE :
|
||||
if(((RaceOverDialog*)GUIEngine::ModalDialog::getCurrent())->menuIsFinished())
|
||||
{
|
||||
// Wait for the race over GUI/modal dialog to appear
|
||||
// Previously the in race race over results are shown,
|
||||
// and getCurrent() returns NULL.
|
||||
GUIEngine::ModalDialog *m = GUIEngine::ModalDialog::getCurrent();
|
||||
if( m && ( (RaceOverDialog*)m)->menuIsFinished() )
|
||||
{
|
||||
m_phase = FINISH_PHASE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case FINISH_PHASE:
|
||||
// Nothing to do here.
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user