The console server can now be fully used for a single game. The first player to join the game is admin, he can start the game and kick players.
However, if the admin player leaves, a new game can only be started if all players have left before (this is a bug, admin status should be passed to another player).
This commit is contained in:
+4
-1
@@ -43,7 +43,7 @@ enum PlayerRights
|
||||
class PlayerData
|
||||
{
|
||||
public:
|
||||
PlayerData(unsigned uniqueId, int number, PlayerType type);
|
||||
PlayerData(unsigned uniqueId, int number, PlayerType type, PlayerRights rights);
|
||||
~PlayerData();
|
||||
|
||||
const std::string &GetName() const
|
||||
@@ -60,6 +60,8 @@ public:
|
||||
{m_netSessionData = session;}
|
||||
PlayerType GetType() const
|
||||
{return m_type;}
|
||||
PlayerRights GetRights() const
|
||||
{return m_rights;}
|
||||
unsigned GetUniqueId() const
|
||||
{return m_uniqueId;}
|
||||
int GetNumber() const
|
||||
@@ -76,6 +78,7 @@ private:
|
||||
std::string m_name;
|
||||
std::string m_avatarFile;
|
||||
PlayerType m_type;
|
||||
PlayerRights m_rights;
|
||||
boost::shared_ptr<SessionData> m_netSessionData;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user