From 4c8a8afa1df1c3d7c48464432d168d2dfa1b81dc Mon Sep 17 00:00:00 2001 From: David Athay Date: Fri, 21 Dec 2007 15:07:20 +0000 Subject: Attempted to fix client freeze when unable to connect to update host, and added exit dialog --- src/game.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index 9a669661..df355e66 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -417,6 +417,19 @@ void Game::logic() // Handle network stuff mNetwork->flush(); mNetwork->dispatchMessages(); + + if (!mNetwork->isConnected()) + { + if (!exitConfirm) + { + exitConfirm = new + ConfirmDialog("Network Error", + "There was a network error, the program will now quit"); + exitConfirm->addActionListener(&exitListener); + } + + exitConfirm->requestMoveToTop(); + } } } -- cgit v1.2.3-60-g2f50