Bug 61130 - Client tells the game has started when it has not
Summary: Client tells the game has started when it has not
Alias: None
Product: atlantik
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Rob Kaper
Depends on:
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:


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
  M +2 -3      selectconfiguration_widget.cpp
  M +1 -2      selectconfiguration_widget.h

--- kdegames/atlantik/client/atlantik.cpp  #
@@ -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  #
@@ -58,5 +58,5 @@ SelectConfiguration::SelectConfiguration
-        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  #
@@ -39,5 +39,4 @@ public:
-        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();