From 3bd3fd5e56385eb7292638f658d92f26d99ccabd Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Wed, 5 May 2010 17:46:32 +1200 Subject: [PATCH] hack it so it works --- OpenRA.Game/Game.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index d0bac35ef2..7e234e7afa 100644 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -437,6 +437,7 @@ namespace OpenRA public static void DispatchMouseInput(MouseInputEvent ev, MouseEventArgs e, Modifiers modifierKeys) { int sync = world.SyncHash(); + var initialWorld = world; if (ev == MouseInputEvent.Down) lastPos = new int2(e.Location); @@ -459,7 +460,7 @@ namespace OpenRA Modifiers = modifierKeys, }); - if( sync != world.SyncHash() ) + if( sync != world.SyncHash() && world == initialWorld ) throw new InvalidOperationException( "Desync in DispatchMouseInput" ); } @@ -602,8 +603,13 @@ namespace OpenRA public static void Disconnect() { + var shellmap = new Manifest(LobbyInfo.GlobalSettings.Mods).ShellmapUid; + LobbyInfo = new Session(); JoinLocal(); - LoadShellMap(new Manifest(LobbyInfo.GlobalSettings.Mods).ShellmapUid); + LoadShellMap(shellmap); + + Chrome.rootWidget.CloseWindow(); + Chrome.rootWidget.OpenWindow("MAINMENU_BG"); } } }