[Server] Add isMarkedForDeleteion function

sol2-server-rewrite
Koncord 7 years ago
parent 91398c5dcc
commit 392e645fe5

@ -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;
}

@ -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

Loading…
Cancel
Save