From f1e856929177bde531107ecb65ee1c82601d2769 Mon Sep 17 00:00:00 2001 From: Koncord Date: Tue, 30 Oct 2018 13:13:07 +0800 Subject: [PATCH] [Server] Remove result from the OnPlayerSendMessage callback --- apps/openmw-mp/Script/ScriptFunctions.hpp | 2 +- apps/openmw-mp/processors/player/ProcessorChatMsg.hpp | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/apps/openmw-mp/Script/ScriptFunctions.hpp b/apps/openmw-mp/Script/ScriptFunctions.hpp index be09fb3a1..7cebe7592 100644 --- a/apps/openmw-mp/Script/ScriptFunctions.hpp +++ b/apps/openmw-mp/Script/ScriptFunctions.hpp @@ -198,7 +198,7 @@ public: {"OnActorDeath", Function()}, {"OnActorCellChange", Function()}, {"OnActorTest", Function()}, - {"OnPlayerSendMessage", Function()}, + {"OnPlayerSendMessage", Function()}, {"OnPlayerEndCharGen", Function()}, {"OnGUIAction", Function()}, {"OnWorldKillCount", Function()}, diff --git a/apps/openmw-mp/processors/player/ProcessorChatMsg.hpp b/apps/openmw-mp/processors/player/ProcessorChatMsg.hpp index cbf8dfcca..bdcd72eed 100644 --- a/apps/openmw-mp/processors/player/ProcessorChatMsg.hpp +++ b/apps/openmw-mp/processors/player/ProcessorChatMsg.hpp @@ -21,16 +21,7 @@ namespace mwmp { DEBUG_PRINTF(strPacketID.c_str()); - Script::CallBackReturn result = true; - Script::Call(result, player.getId(), player.chatMessage.c_str()); - - if (result) - { - player.chatMessage = player.npc.mName + " (" + std::to_string(player.getId()) + "): " - + player.chatMessage + "\n"; - packet.Send(false); - packet.Send(true); - } + Script::Call(player.getId(), player.chatMessage.c_str()); } }; }