fixed editor bug (used wrong ViewState after LevelComplete)

main
Martin Felis 2011-03-27 22:59:01 +02:00
parent 057bf0e1cc
commit 6a06285dc9
1 changed files with 6 additions and 6 deletions

View File

@ -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);
}