From 392e645fe58cc7617728a9f8654aff7fcf7ffbd9 Mon Sep 17 00:00:00 2001 From: Koncord Date: Fri, 8 Dec 2017 20:37:22 +0800 Subject: [PATCH] [Server] Add isMarkedForDeleteion function --- apps/openmw-mp/Player.cpp | 9 ++++++++- apps/openmw-mp/Player.hpp | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) 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