The checkbox "fill up with computer players" is now working (protocol has been changed to implement this). Lobby dialog is now also used after joining the game. Leaving game not possible yet.

This commit is contained in:
lotodore
2007-09-05 19:14:34 +00:00
parent d789162a2a
commit 9f6bf5206e
14 changed files with 288 additions and 147 deletions
+6 -6
View File
@@ -186,11 +186,11 @@ void Session::clientCreateGame(const GameData &gameData, const string &name, con
myNetClient->SendCreateGame(gameData, name, password);
}
void Session::clientJoinGame(const std::string &name, const std::string &password)
void Session::clientJoinGame(unsigned gameId, const std::string &password)
{
if (!myNetClient)
return; // only act if client is running.
myNetClient->SendJoinGame(name, password);
myNetClient->SendJoinGame(gameId, password);
}
void Session::startNetworkServer()
@@ -234,11 +234,11 @@ void Session::waitForNetworkServer(unsigned timeoutMsec)
}
}
void Session::sendStartEvent()
void Session::sendStartEvent(bool fillUpWithCpuPlayers)
{
if (!myNetClient)
return; // only act if client is running.
myNetClient->SendStartEvent();
myNetClient->SendStartEvent(fillUpWithCpuPlayers);
}
void Session::sendClientPlayerAction()
@@ -255,11 +255,11 @@ void Session::sendChatMessage(const std::string &message)
myNetClient->SendChatMessage(message);
}
void Session::kickPlayer(const std::string &playerName)
void Session::kickPlayer(unsigned playerId)
{
if (!myNetClient)
return; // only act if client is running.
myNetClient->SendKickPlayer(playerName);
myNetClient->SendKickPlayer(playerId);
}
bool Session::isNetworkClientRunning() const