From 3101de5f028015cfde7a5835c06be5af4a68b7f6 Mon Sep 17 00:00:00 2001 From: Koncord Date: Tue, 30 Oct 2018 12:56:50 +0800 Subject: [PATCH] [Server] Add kicked load status --- apps/openmw-mp/Player.hpp | 3 ++- apps/openmw-mp/Script/Functions/Server.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/openmw-mp/Player.hpp b/apps/openmw-mp/Player.hpp index 4681db43a..a59319f3b 100644 --- a/apps/openmw-mp/Player.hpp +++ b/apps/openmw-mp/Player.hpp @@ -51,7 +51,8 @@ public: { NOTLOADED=0, LOADED, - POSTLOADED + POSTLOADED, + KICKED }; Player(RakNet::RakNetGUID guid); diff --git a/apps/openmw-mp/Script/Functions/Server.cpp b/apps/openmw-mp/Script/Functions/Server.cpp index b8f84136b..8ac68bf1d 100644 --- a/apps/openmw-mp/Script/Functions/Server.cpp +++ b/apps/openmw-mp/Script/Functions/Server.cpp @@ -21,6 +21,7 @@ void ServerFunctions::Kick(unsigned short pid) noexcept LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Kicking player %s (%i)", player->npc.mName.c_str(), player->getId()); mwmp::Networking::getPtr()->kickPlayer(player->guid); + player->setLoadState(Player::KICKED); } void ServerFunctions::BanAddress(const char *ipAddress) noexcept