From fe1082152893af59d3f19071fc48aee33f4321a2 Mon Sep 17 00:00:00 2001 From: Koncord Date: Sun, 18 Sep 2016 11:48:08 +0800 Subject: [PATCH] Add loaded/isLoaded to server player --- apps/openmw-mp/Player.cpp | 10 ++++++++++ apps/openmw-mp/Player.hpp | 5 ++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/apps/openmw-mp/Player.cpp b/apps/openmw-mp/Player.cpp index 87125435c..d79e61b06 100644 --- a/apps/openmw-mp/Player.cpp +++ b/apps/openmw-mp/Player.cpp @@ -64,6 +64,7 @@ std::map *Players::GetPlayers() Player::Player(RakNet::RakNetGUID id) : BasePlayer(id) { handshake = false; + loaded = false; } Player::~Player() @@ -91,6 +92,15 @@ bool Player::isHandshaked() return handshake; } +void Player::Loaded() +{ + loaded = true; +} + +bool Player::isLoaded() +{ + return loaded; +} Player *Players::GetPlayer(unsigned short id) { diff --git a/apps/openmw-mp/Player.hpp b/apps/openmw-mp/Player.hpp index b3baa300f..6942268e1 100644 --- a/apps/openmw-mp/Player.hpp +++ b/apps/openmw-mp/Player.hpp @@ -46,12 +46,15 @@ public: void SetID(unsigned short id); bool isHandshaked(); - void Handshake(); + void Loaded(); + bool isLoaded(); + virtual ~Player(); private: bool handshake; + bool loaded; }; #endif //OPENMW_PLAYER_HPP