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:
lotodore
2007-08-26 22:41:37 +00:00
parent ba17f1d08e
commit 56b24e09eb
19 changed files with 755 additions and 104 deletions
+9
View File
@@ -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)