From 6a06285dc91458738dc8c5d233c735ca2a9db493 Mon Sep 17 00:00:00 2001 From: Martin Felis Date: Sun, 27 Mar 2011 22:59:01 +0200 Subject: [PATCH] fixed editor bug (used wrong ViewState after LevelComplete) --- asteroids/View.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/asteroids/View.cc b/asteroids/View.cc index c2cbc3a..046ff90 100644 --- a/asteroids/View.cc +++ b/asteroids/View.cc @@ -733,12 +733,6 @@ void View::DrawUiLevelComplete() { if(Engine::GUI::Button (1, "Next level ...", (screen_right - button_width) * 0.5, screen_bottom * 0.5 + 60, button_width, button_height)) { PopViewState(); - PushViewState(ViewStateLevelIntro); - Engine::StartTimer ("LevelIntroLevelNumber", 0.4); - Engine::StartTimer ("LevelIntroLevelTitle", 0.6); - Engine::StartTimer ("LevelIntroLevelAuthor", 0.8); - Engine::StartTimer ("LevelIntroLevelStart", 1.0); - // we have to take care when we are testing the level to not proceed to // the next level... if (GetViewState() == ViewStateEditor) { @@ -749,6 +743,12 @@ void View::DrawUiLevelComplete() { mEditorState = EditorStateUnknown; } } else { + PushViewState(ViewStateLevelIntro); + Engine::StartTimer ("LevelIntroLevelNumber", 0.4); + Engine::StartTimer ("LevelIntroLevelTitle", 0.6); + Engine::StartTimer ("LevelIntroLevelAuthor", 0.8); + Engine::StartTimer ("LevelIntroLevelStart", 1.0); + GetModel()->ProceedToNextLevel(); GetModel()->SetGameState(GameStatePaused); }