diff --git a/apps/openmw-mp/Player.cpp b/apps/openmw-mp/Player.cpp index 5418e07cc..f275ec51e 100644 --- a/apps/openmw-mp/Player.cpp +++ b/apps/openmw-mp/Player.cpp @@ -91,7 +91,8 @@ void Player::Init(LuaState &lua) "cellStateSize", &Player::cellStateSize, "addCellExplored", &Player::addCellExplored, "setAuthority", &Player::setAuthority, - "customData", &Player::customData + "customData", &Player::customData, + "markedForDeletion", sol::property(&Player::isMarkedForDeleteion) ); lua.getState()->new_enum("ChannelAction", @@ -116,6 +117,7 @@ Player::Player(RakNet::RakNetGUID guid) : BasePlayer(guid), NetActor(), changedM npcStats.blank(); creatureStats.blank(); charClass.blank(); + markedForDeletion = false; customData = mwmp::Networking::get().getState().getState()->create_table(); } @@ -807,3 +809,8 @@ void Player::setAuthority() serverCell->sendToLoaded(authorityPacket, &writeActorList); } } + +bool Player::isMarkedForDeleteion() const +{ + return markedForDeletion; +} diff --git a/apps/openmw-mp/Player.hpp b/apps/openmw-mp/Player.hpp index f285fbd5e..c5e0bc466 100644 --- a/apps/openmw-mp/Player.hpp +++ b/apps/openmw-mp/Player.hpp @@ -186,6 +186,8 @@ public: void setAuthority(); + bool isMarkedForDeleteion() const; + private: CellController::TContainer cells; int handshakeCounter; @@ -200,6 +202,7 @@ private: Quests quests; Spells spells; sol::table customData; + bool markedForDeletion; }; #endif //OPENMW_PLAYER_HPP