Stop all GUI timers before starting an internet / network game.
This commit is contained in:
@@ -833,6 +833,9 @@ void mainWindowImpl::callCreateNetworkGameDialog() {
|
|||||||
//
|
//
|
||||||
if (myCreateNetworkGameDialog->result() == QDialog::Accepted ) {
|
if (myCreateNetworkGameDialog->result() == QDialog::Accepted ) {
|
||||||
|
|
||||||
|
// Stop local game.
|
||||||
|
stopTimer();
|
||||||
|
|
||||||
if (!myServerGuiInterface.get())
|
if (!myServerGuiInterface.get())
|
||||||
{
|
{
|
||||||
// Create pseudo Gui Wrapper for the server.
|
// Create pseudo Gui Wrapper for the server.
|
||||||
@@ -913,6 +916,9 @@ void mainWindowImpl::callJoinNetworkGameDialog() {
|
|||||||
|
|
||||||
if (myJoinNetworkGameDialog->result() == QDialog::Accepted ) {
|
if (myJoinNetworkGameDialog->result() == QDialog::Accepted ) {
|
||||||
|
|
||||||
|
// Stop local game.
|
||||||
|
stopTimer();
|
||||||
|
|
||||||
mySession->terminateNetworkClient();
|
mySession->terminateNetworkClient();
|
||||||
if (myServerGuiInterface.get())
|
if (myServerGuiInterface.get())
|
||||||
myServerGuiInterface->getSession().terminateNetworkServer();
|
myServerGuiInterface->getSession().terminateNetworkServer();
|
||||||
@@ -964,6 +970,9 @@ void mainWindowImpl::callGameLobbyDialog() {
|
|||||||
|
|
||||||
void mainWindowImpl::joinGameLobby() {
|
void mainWindowImpl::joinGameLobby() {
|
||||||
|
|
||||||
|
// Stop local game.
|
||||||
|
stopTimer();
|
||||||
|
|
||||||
// Join Lobby
|
// Join Lobby
|
||||||
mySession->terminateNetworkClient();
|
mySession->terminateNetworkClient();
|
||||||
if (myServerGuiInterface.get())
|
if (myServerGuiInterface.get())
|
||||||
|
|||||||
Reference in New Issue
Block a user