1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-10-05 11:56:31 +00:00

Add loaded/isLoaded to server player

This commit is contained in:
Koncord 2016-09-18 11:48:08 +08:00
parent fe370fa995
commit fe10821528
2 changed files with 14 additions and 1 deletions

View file

@ -64,6 +64,7 @@ std::map<RakNet::RakNetGUID, Player*> *Players::GetPlayers()
Player::Player(RakNet::RakNetGUID id) : BasePlayer(id) Player::Player(RakNet::RakNetGUID id) : BasePlayer(id)
{ {
handshake = false; handshake = false;
loaded = false;
} }
Player::~Player() Player::~Player()
@ -91,6 +92,15 @@ bool Player::isHandshaked()
return handshake; return handshake;
} }
void Player::Loaded()
{
loaded = true;
}
bool Player::isLoaded()
{
return loaded;
}
Player *Players::GetPlayer(unsigned short id) Player *Players::GetPlayer(unsigned short id)
{ {

View file

@ -46,12 +46,15 @@ public:
void SetID(unsigned short id); void SetID(unsigned short id);
bool isHandshaked(); bool isHandshaked();
void Handshake(); void Handshake();
void Loaded();
bool isLoaded();
virtual ~Player(); virtual ~Player();
private: private:
bool handshake; bool handshake;
bool loaded;
}; };
#endif //OPENMW_PLAYER_HPP #endif //OPENMW_PLAYER_HPP