Major design change in network protocol: Player information is now requested by clients whenever it is needed. The server only sends player ids. The client has a cache with player information.
This commit is contained in:
@@ -40,6 +40,13 @@ enum PlayerRights
|
||||
PLAYER_RIGHTS_ADMIN
|
||||
};
|
||||
|
||||
struct PlayerInfo
|
||||
{
|
||||
PlayerInfo() : ptype(PLAYER_TYPE_HUMAN) {}
|
||||
std::string playerName;
|
||||
PlayerType ptype;
|
||||
};
|
||||
|
||||
class PlayerData
|
||||
{
|
||||
public:
|
||||
@@ -60,6 +67,8 @@ public:
|
||||
{m_netSessionData = session;}
|
||||
PlayerType GetType() const
|
||||
{return m_type;}
|
||||
void SetType(PlayerType type)
|
||||
{m_type = type;}
|
||||
PlayerRights GetRights() const
|
||||
{return m_rights;}
|
||||
void SetRights(PlayerRights rights)
|
||||
|
||||
Reference in New Issue
Block a user