Work on spectator mode - joining as spectator now possible (on server side).

This commit is contained in:
lotodore
2013-06-29 16:23:10 +02:00
parent cbd6b40f85
commit ef489dae8a
12 changed files with 732 additions and 118 deletions
+3
View File
@@ -82,6 +82,7 @@ public:
static boost::shared_ptr<NetPacket> CreateNetPacketPlayerJoined(unsigned gameId, const PlayerData &playerData);
static boost::shared_ptr<NetPacket> CreateNetPacketSpectatorJoined(unsigned gameId, const PlayerData &playerData);
static boost::shared_ptr<NetPacket> CreateNetPacketJoinGameAck(const ServerGame &server, const PlayerData &playerData, bool spectateOnly);
static boost::shared_ptr<NetPacket> CreateNetPacketHandStart(const ServerGame &server);
static void AcceptNewSession(boost::shared_ptr<ServerGame> server, boost::shared_ptr<SessionData> session, bool spectateOnly);
@@ -190,7 +191,9 @@ protected:
static void CheckPlayerTimeouts(boost::shared_ptr<ServerGame> server);
static void ReactivatePlayers(boost::shared_ptr<ServerGame> server);
static void InitRejoiningPlayers(boost::shared_ptr<ServerGame> server);
static void InitNewSpectators(boost::shared_ptr<ServerGame> server);
static void PerformRejoin(boost::shared_ptr<ServerGame> server, boost::shared_ptr<SessionData> session);
static void SendGameData(boost::shared_ptr<ServerGame> server, boost::shared_ptr<SessionData> session);
private:
static ServerGameStateHand s_state;