Bug 61130 - Client tells the game has started when it has not
Summary: Client tells the game has started when it has not
Status: RESOLVED FIXED
Alias: None
Product: atlantik
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Rob Kaper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-12 13:13 UTC by Albert Astals Cid
Modified: 2003-07-12 19:49 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Albert Astals Cid 2003-07-12 13:13:29 UTC
Version:            (using KDE 3.1.9)
Compiler:          gcc version 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk)
OS:          Linux (i686) release 2.4.21-0.18mdk

It is easy to reproduce, go to a server, create a game and then without waiting for people to enter the game, press Start Game.

The status bar will change to "Game started. Retrieving full game data..." but in the lateral bar you'll get "Error: This game requires at least 2 players to be started."
Comment 1 Rob Kaper 2003-07-12 19:49:55 UTC
Subject: KDE_3_1_BRANCH: kdegames/atlantik/client

CVS commit by kaper: 

fix #61130: Client tells the game has started when it has not

CCMAIL: 61130-done@bugs.kde.org


  M +1 -0      atlantik.cpp   1.121.6.19
  M +2 -3      selectconfiguration_widget.cpp   1.26.6.6
  M +1 -2      selectconfiguration_widget.h   1.12.6.4


--- kdegames/atlantik/client/atlantik.cpp  #1.121.6.18:1.121.6.19
@@ -303,4 +303,5 @@ void Atlantik::showSelectConfiguration()
         connect(m_atlantikNetwork, SIGNAL(gameOption(QString, QString, QString, QString, QString)), m_selectConfiguration, SLOT(gameOption(QString, QString, QString, QString, QString)));
         connect(m_atlantikNetwork, SIGNAL(endConfigUpdate()), m_selectConfiguration, SLOT(slotEndUpdate()));
+        connect(m_atlantikNetwork, SIGNAL(gameInit()), m_selectConfiguration, SLOT(initGame()));
         connect(m_selectConfiguration, SIGNAL(startGame()), m_atlantikNetwork, SLOT(startGame()));
         connect(m_selectConfiguration, SIGNAL(leaveGame()), m_atlantikNetwork, SLOT(leaveGame()));

--- kdegames/atlantik/client/selectconfiguration_widget.cpp  #1.26.6.5:1.26.6.6
@@ -58,5 +58,5 @@ SelectConfiguration::SelectConfiguration
         serverButtons->addWidget(m_connectButton);
 
-        connect(m_connectButton, SIGNAL(clicked()), this, SLOT(connectClicked()));
+        connect(m_connectButton, SIGNAL(clicked()), this, SIGNAL(startGame()));
 
     // Status indicator.
@@ -71,8 +71,7 @@ SelectConfiguration::~SelectConfiguratio
 }
 
-void SelectConfiguration::connectClicked()
+void SelectConfiguration::initGame()
 {
         m_statusLabel->setText(i18n("Game started. Retrieving full game data..."));
-        emit startGame();
 }
 

--- kdegames/atlantik/client/selectconfiguration_widget.h  #1.12.6.3:1.12.6.4
@@ -39,5 +39,4 @@ public:
         ~SelectConfiguration();
 
-        void initPage();
         void setCanStart(const bool &canStart);
         QString hostToConnect() const;
@@ -45,8 +44,8 @@ public:
 
 private slots:
-        void connectClicked();
         void gameOption(QString title, QString type, QString value, QString edit, QString command);
         void optionChanged();
         void slotEndUpdate();
+        void initGame();
 
 signals: