Stop all GUI timers before starting an internet / network game.

This commit is contained in:
lotodore
2007-10-08 20:32:17 +00:00
parent 310fadefdb
commit 9ba000d7f9
+9
View File
@@ -833,6 +833,9 @@ void mainWindowImpl::callCreateNetworkGameDialog() {
//
if (myCreateNetworkGameDialog->result() == QDialog::Accepted ) {
// Stop local game.
stopTimer();
if (!myServerGuiInterface.get())
{
// Create pseudo Gui Wrapper for the server.
@@ -913,6 +916,9 @@ void mainWindowImpl::callJoinNetworkGameDialog() {
if (myJoinNetworkGameDialog->result() == QDialog::Accepted ) {
// Stop local game.
stopTimer();
mySession->terminateNetworkClient();
if (myServerGuiInterface.get())
myServerGuiInterface->getSession().terminateNetworkServer();
@@ -964,6 +970,9 @@ void mainWindowImpl::callGameLobbyDialog() {
void mainWindowImpl::joinGameLobby() {
// Stop local game.
stopTimer();
// Join Lobby
mySession->terminateNetworkClient();
if (myServerGuiInterface.get())