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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user