From 73d030b779f64ca1982099bafe8afc9879ffdecf Mon Sep 17 00:00:00 2001 From: Koncord Date: Sat, 17 Feb 2018 14:24:38 +0800 Subject: [PATCH] [Server] Remove return value from ON_PLAYER_CONNECT event --- apps/openmw-mp/Networking.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openmw-mp/Networking.cpp b/apps/openmw-mp/Networking.cpp index 7dac44de6..dc6389658 100644 --- a/apps/openmw-mp/Networking.cpp +++ b/apps/openmw-mp/Networking.cpp @@ -117,9 +117,9 @@ void Networking::processPlayerPacket(RakNet::Packet *packet) player->setLoadState(Player::LOADED); player->joinChannel(0, "Default"); - bool result = luaState.getEventCtrl().Call(player.get()); + luaState.getEventCtrl().Call(player.get()); - if (!result) + if (peer->GetConnectionState(player->guid) != RakNet::ConnectionState::IS_CONNECTED) { LOG_MESSAGE(Log::LOG_TRACE, "Player \"%s\" Disconnected by ON_PLAYER_CONNECT event", player->getName().c_str()); playerPacketController->GetPacket(ID_USER_DISCONNECTED)->setPlayer(player.get());