Synchronize on network game start, so that everyone has received all avatars and player names before the game starts. Store all computer players in a separate list on the server for name retrieval.

This commit is contained in:
lotodore
2007-10-07 21:23:37 +00:00
parent d16312111f
commit 0d0d8dc810
18 changed files with 452 additions and 64 deletions
+35
View File
@@ -234,6 +234,41 @@ protected:
virtual int InternalProcess(ClientThread &client, boost::shared_ptr<NetPacket> packet);
};
// State: Synchronize on game start.
class ClientStateSynchronizeStart : public AbstractClientStateReceiving
{
public:
// Access the state singleton.
static ClientStateSynchronizeStart &Instance();
virtual ~ClientStateSynchronizeStart();
virtual int Process(ClientThread &client);
protected:
// Protected constructor - this is a singleton.
ClientStateSynchronizeStart();
virtual int InternalProcess(ClientThread &client, boost::shared_ptr<NetPacket> packet);
};
// State: Wait for game start.
class ClientStateWaitStart : public AbstractClientStateReceiving
{
public:
// Access the state singleton.
static ClientStateWaitStart &Instance();
virtual ~ClientStateWaitStart();
protected:
// Protected constructor - this is a singleton.
ClientStateWaitStart();
virtual int InternalProcess(ClientThread &client, boost::shared_ptr<NetPacket> packet);
};
// State: Wait for start of the next hand.
class ClientStateWaitHand : public AbstractClientStateReceiving
{