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
+18
View File
@@ -68,6 +68,7 @@ class NetPacketGameAdminChanged;
class NetPacketKickPlayer;
class NetPacketLeaveCurrentGame;
class NetPacketStartEvent;
class NetPacketStartEventAck;
class NetPacketGameStart;
class NetPacketHandStart;
class NetPacketPlayersTurn;
@@ -125,6 +126,7 @@ public:
virtual const NetPacketKickPlayer *ToNetPacketKickPlayer() const;
virtual const NetPacketLeaveCurrentGame *ToNetPacketLeaveCurrentGame() const;
virtual const NetPacketStartEvent *ToNetPacketStartEvent() const;
virtual const NetPacketStartEventAck *ToNetPacketStartEventAck() const;
virtual const NetPacketGameStart *ToNetPacketGameStart() const;
virtual const NetPacketHandStart *ToNetPacketHandStart() const;
virtual const NetPacketPlayersTurn *ToNetPacketPlayersTurn() const;
@@ -681,6 +683,22 @@ protected:
virtual void InternalCheck(const NetPacketHeader* data) const;
};
class NetPacketStartEventAck : public NetPacket
{
public:
NetPacketStartEventAck();
virtual ~NetPacketStartEventAck();
virtual boost::shared_ptr<NetPacket> Clone() const;
virtual const NetPacketStartEventAck *ToNetPacketStartEventAck() const;
protected:
virtual void InternalCheck(const NetPacketHeader* data) const;
};
class NetPacketGameStart : public NetPacket
{
public: