From 88ae0772cf1be1dd252c20b6ccaec98d36d3c30f Mon Sep 17 00:00:00 2001 From: David Cernat Date: Tue, 30 Jan 2018 22:51:35 +0200 Subject: [PATCH] [Server] Initialize new processors and fix issues with RecordDynamic --- apps/openmw-mp/Script/ScriptFunctions.hpp | 1 + apps/openmw-mp/processors/ProcessorInitializer.cpp | 14 ++++++++++++++ .../processors/player/ProcessorRecordDynamic.hpp | 10 +++++----- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/apps/openmw-mp/Script/ScriptFunctions.hpp b/apps/openmw-mp/Script/ScriptFunctions.hpp index fd151a329..caaf3d593 100644 --- a/apps/openmw-mp/Script/ScriptFunctions.hpp +++ b/apps/openmw-mp/Script/ScriptFunctions.hpp @@ -163,6 +163,7 @@ public: {"OnPlayerMap", Function()}, {"OnPlayerInteraction", Function()}, {"OnPlayerRest", Function()}, + {"OnRecordDynamic", Function()}, {"OnCellLoad", Function()}, {"OnCellUnload", Function()}, {"OnCellDeletion", Function()}, diff --git a/apps/openmw-mp/processors/ProcessorInitializer.cpp b/apps/openmw-mp/processors/ProcessorInitializer.cpp index c2cad7ecf..ee5fd14c7 100644 --- a/apps/openmw-mp/processors/ProcessorInitializer.cpp +++ b/apps/openmw-mp/processors/ProcessorInitializer.cpp @@ -11,6 +11,7 @@ #include "player/ProcessorChatMsg.hpp" #include "player/ProcessorGUIMessageBox.hpp" #include "player/ProcessorGameWeather.hpp" +#include "player/ProcessorRecordDynamic.hpp" #include "player/ProcessorPlayerCharGen.hpp" #include "player/ProcessorPlayerAnimFlags.hpp" #include "player/ProcessorPlayerAnimPlay.hpp" @@ -28,10 +29,13 @@ #include "player/ProcessorPlayerInventory.hpp" #include "player/ProcessorPlayerJournal.hpp" #include "player/ProcessorPlayerKillCount.hpp" +#include "player/ProcessorPlayerInteraction.hpp" #include "player/ProcessorPlayerLevel.hpp" #include "player/ProcessorPlayerMap.hpp" +#include "player/ProcessorPlayerMiscellaneous.hpp" #include "player/ProcessorPlayerPosition.hpp" #include "player/ProcessorPlayerQuickKeys.hpp" +#include "player/ProcessorPlayerReputation.hpp" #include "player/ProcessorPlayerRest.hpp" #include "player/ProcessorPlayerResurrect.hpp" #include "player/ProcessorPlayerShapeshift.hpp" @@ -50,6 +54,7 @@ #include "actor/ProcessorActorCellChange.hpp" #include "actor/ProcessorActorDeath.hpp" #include "actor/ProcessorActorEquipment.hpp" +#include "actor/ProcessorActorInteraction.hpp" #include "actor/ProcessorActorStatsDynamic.hpp" #include "actor/ProcessorActorPosition.hpp" #include "actor/ProcessorActorSpeech.hpp" @@ -70,7 +75,9 @@ #include "world/ProcessorScriptLocalShort.hpp" #include "world/ProcessorScriptLocalFloat.hpp" #include "world/ProcessorScriptMemberShort.hpp" +#include "world/ProcessorScriptMemberFloat.hpp" #include "world/ProcessorScriptGlobalShort.hpp" +#include "world/ProcessorScriptGlobalFloat.hpp" #include "world/ProcessorVideoPlay.hpp" @@ -81,6 +88,7 @@ void ProcessorInitializer() PlayerProcessor::AddProcessor(new ProcessorChatMsg()); PlayerProcessor::AddProcessor(new ProcessorGUIMessageBox()); PlayerProcessor::AddProcessor(new ProcessorGameWeather()); + PlayerProcessor::AddProcessor(new ProcessorRecordDynamic()); PlayerProcessor::AddProcessor(new ProcessorPlayerCharGen()); PlayerProcessor::AddProcessor(new ProcessorPlayerAnimFlags()); PlayerProcessor::AddProcessor(new ProcessorPlayerAnimPlay()); @@ -98,10 +106,13 @@ void ProcessorInitializer() PlayerProcessor::AddProcessor(new ProcessorPlayerInventory()); PlayerProcessor::AddProcessor(new ProcessorPlayerJournal()); PlayerProcessor::AddProcessor(new ProcessorPlayerKillCount()); + PlayerProcessor::AddProcessor(new ProcessorPlayerInteraction()); PlayerProcessor::AddProcessor(new ProcessorPlayerLevel()); PlayerProcessor::AddProcessor(new ProcessorPlayerMap()); + PlayerProcessor::AddProcessor(new ProcessorPlayerMiscellaneous()); PlayerProcessor::AddProcessor(new ProcessorPlayerPosition()); PlayerProcessor::AddProcessor(new ProcessorPlayerQuickKeys()); + PlayerProcessor::AddProcessor(new ProcessorPlayerReputation()); PlayerProcessor::AddProcessor(new ProcessorPlayerRest()); PlayerProcessor::AddProcessor(new ProcessorPlayerResurrect()); PlayerProcessor::AddProcessor(new ProcessorPlayerShapeshift()); @@ -119,6 +130,7 @@ void ProcessorInitializer() ActorProcessor::AddProcessor(new ProcessorActorCellChange()); ActorProcessor::AddProcessor(new ProcessorActorDeath()); ActorProcessor::AddProcessor(new ProcessorActorEquipment()); + ActorProcessor::AddProcessor(new ProcessorActorInteraction()); ActorProcessor::AddProcessor(new ProcessorActorPosition()); ActorProcessor::AddProcessor(new ProcessorActorSpeech()); ActorProcessor::AddProcessor(new ProcessorActorStatsDynamic()); @@ -140,6 +152,8 @@ void ProcessorInitializer() WorldProcessor::AddProcessor(new ProcessorScriptLocalShort()); WorldProcessor::AddProcessor(new ProcessorScriptLocalFloat()); WorldProcessor::AddProcessor(new ProcessorScriptMemberShort()); + WorldProcessor::AddProcessor(new ProcessorScriptMemberFloat()); WorldProcessor::AddProcessor(new ProcessorScriptGlobalShort()); + WorldProcessor::AddProcessor(new ProcessorScriptGlobalFloat()); WorldProcessor::AddProcessor(new ProcessorVideoPlay()); } diff --git a/apps/openmw-mp/processors/player/ProcessorRecordDynamic.hpp b/apps/openmw-mp/processors/player/ProcessorRecordDynamic.hpp index 790e286c9..4acb7b0a8 100644 --- a/apps/openmw-mp/processors/player/ProcessorRecordDynamic.hpp +++ b/apps/openmw-mp/processors/player/ProcessorRecordDynamic.hpp @@ -1,14 +1,14 @@ -#ifndef OPENMW_PROCESSORPLAYERRECORDDYNAMIC_HPP -#define OPENMW_PROCESSORPLAYERRECORDDYNAMIC_HPP +#ifndef OPENMW_PROCESSORRECORDDYNAMIC_HPP +#define OPENMW_PROCESSORRECORDDYNAMIC_HPP #include "../PlayerProcessor.hpp" namespace mwmp { - class ProcessorPlayerRecordDynamic : public PlayerProcessor + class ProcessorRecordDynamic : public PlayerProcessor { public: - ProcessorPlayerRecordDynamic() + ProcessorRecordDynamic() { BPP_INIT(ID_RECORD_DYNAMIC) } @@ -22,4 +22,4 @@ namespace mwmp }; } -#endif //OPENMW_PROCESSORPLAYERRECORDDYNAMIC_HPP +#endif //OPENMW_PROCESSORRECORDDYNAMIC_HPP