From b549da996ed44006960295858f9ce087262d4a43 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Sun, 29 Jan 2017 13:16:17 +0200 Subject: [PATCH] [Server] On second thought, keep cell description as argument to them --- apps/openmw-mp/Networking.cpp | 8 ++++++-- apps/openmw-mp/Script/ScriptFunctions.hpp | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/openmw-mp/Networking.cpp b/apps/openmw-mp/Networking.cpp index 2246534f1..f3e2aa9ca 100644 --- a/apps/openmw-mp/Networking.cpp +++ b/apps/openmw-mp/Networking.cpp @@ -435,7 +435,9 @@ void Networking::processWorldPacket(RakNet::Packet *packet) { worldObject = worldEvent->objectChanges.objects[i]; - Script::Call(player->getId()); + Script::Call( + player->getId(), + worldEvent->cell.getDescription().c_str()); } break; @@ -455,7 +457,9 @@ void Networking::processWorldPacket(RakNet::Packet *packet) { worldObject = worldEvent->objectChanges.objects[i]; - Script::Call(player->getId()); + Script::Call( + player->getId(), + worldEvent->cell.getDescription().c_str()); } break; diff --git a/apps/openmw-mp/Script/ScriptFunctions.hpp b/apps/openmw-mp/Script/ScriptFunctions.hpp index 9355945e7..f20665726 100644 --- a/apps/openmw-mp/Script/ScriptFunctions.hpp +++ b/apps/openmw-mp/Script/ScriptFunctions.hpp @@ -117,8 +117,8 @@ public: {"OnPlayerInventoryChange", Function()}, {"OnPlayerSpellbookChange", Function()}, {"OnPlayerJournalChange", Function()}, - {"OnObjectPlace", Function()}, - {"OnObjectDelete", Function()}, + {"OnObjectPlace", Function()}, + {"OnObjectDelete", Function()}, {"OnPlayerSendMessage", Function()}, {"OnPlayerEndCharGen", Function()}, {"OnGUIAction", Function()}