From 1ccb4209cdb1028e3b692dcf0bb06f0b5eef9fc2 Mon Sep 17 00:00:00 2001 From: Wanne Date: Fri, 1 Mar 2013 14:34:34 +0000 Subject: [PATCH] - Improved dirty assertion fix in Main Menu from Revision 5882 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5884 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- MainMenuScreen.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/MainMenuScreen.cpp b/MainMenuScreen.cpp index 1659927e..36c41e94 100644 --- a/MainMenuScreen.cpp +++ b/MainMenuScreen.cpp @@ -354,16 +354,15 @@ void ExitMainMenu( ) { if (gMainMenulayout[iCounter2].Visible == 1) { - // WANNE: This is a dirty fix. I don't know when that was introduced, but when clicking on "Multiplayer Game", the game crashes when trying to call DeleteVideoSurfaceFromIndex() - if (is_networked && iCounter2 == 1) - continue; - -// DeleteVideoObjectFromIndex( gMainMenulayout[iCounter2].uiIndex ); DeleteVideoSurfaceFromIndex( gMainMenulayout[iCounter2].uiIndex ); } } gMsgBox.uiExitScreen = MAINMENU_SCREEN; + + // Reload the external gameplay data for a multiplayer game + if (is_networked) + LoadExternalGameplayData(TABLEDATA_DIRECTORY); } // WANNE - MP: This method initializes variables that should be initialized @@ -446,9 +445,6 @@ void MenuButtonCallback(GUI_BUTTON *btn,INT32 reason) //if something didnt work, dont even know how to make error code...//hayden } - // Reload the external gameplay data, because maybe we started a MP game before! - LoadExternalGameplayData(TABLEDATA_DIRECTORY); - SetMainMenuExitScreen( MP_JOIN_SCREEN ); // OJW - 20081129 //SetMainMenuExitScreen( GAME_INIT_OPTIONS_SCREEN ); }