diff --git a/apps/openmw/mwmp/ProcessorInitializer.cpp b/apps/openmw/mwmp/ProcessorInitializer.cpp index f569fc77a..b9d239f8f 100644 --- a/apps/openmw/mwmp/ProcessorInitializer.cpp +++ b/apps/openmw/mwmp/ProcessorInitializer.cpp @@ -47,6 +47,16 @@ #include "processors/world/ProcessorScriptMemberShort.hpp" #include "processors/world/ProcessorVideoPlay.hpp" +#include "processors/actor/ProcessorActorAnimFlags.hpp" +#include "processors/actor/ProcessorActorAnimPlay.hpp" +#include "processors/actor/ProcessorActorAttack.hpp" +#include "processors/actor/ProcessorActorAuthority.hpp" +#include "processors/actor/ProcessorActorCellChange.hpp" +#include "processors/actor/ProcessorActorList.hpp" +#include "processors/actor/ProcessorActorPosition.hpp" +#include "processors/actor/ProcessorActorSpeech.hpp" +#include "processors/actor/ProcessorActorStatsDynamic.hpp" +#include "processors/actor/ProcessorActorTest.hpp" using namespace mwmp; @@ -92,4 +102,15 @@ void ProcessorInitializer() WorldProcessor::AddProcessor(new ProcessorScriptLocalShort()); WorldProcessor::AddProcessor(new ProcessorScriptMemberShort()); WorldProcessor::AddProcessor(new ProcessorVideoPlay()); + + ActorProcessor::AddProcessor(new ProcessorActorAnimFlags()); + ActorProcessor::AddProcessor(new ProcessorActorAnimPlay()); + ActorProcessor::AddProcessor(new ProcessorActorAttack()); + ActorProcessor::AddProcessor(new ProcessorActorAuthority()); + ActorProcessor::AddProcessor(new ProcessorActorCellChange()); + ActorProcessor::AddProcessor(new ProcessorActorList()); + ActorProcessor::AddProcessor(new ProcessorActorPosition()); + ActorProcessor::AddProcessor(new ProcessorActorSpeech()); + ActorProcessor::AddProcessor(new ProcessorActorStatsDynamic()); + ActorProcessor::AddProcessor(new ProcessorActorTest()); } \ No newline at end of file diff --git a/apps/openmw/mwmp/processors/actor/ProcessorActorAnimFlags.hpp b/apps/openmw/mwmp/processors/actor/ProcessorActorAnimFlags.hpp new file mode 100644 index 000000000..0ba32694d --- /dev/null +++ b/apps/openmw/mwmp/processors/actor/ProcessorActorAnimFlags.hpp @@ -0,0 +1,30 @@ +// +// Created by koncord on 18.04.17. +// + +#ifndef OPENMW_PROCESSORACTORANIMFLAGS_HPP +#define OPENMW_PROCESSORACTORANIMFLAGS_HPP + + +#include "apps/openmw/mwmp/ActorProcessor.hpp" +#include "apps/openmw/mwmp/Main.hpp" +#include "apps/openmw/mwmp/CellController.hpp" + +namespace mwmp +{ + class ProcessorActorAnimFlags : public ActorProcessor + { + public: + ProcessorActorAnimFlags() + { + BPP_INIT(ID_ACTOR_ANIM_FLAGS); + } + + virtual void Do(ActorPacket &packet, ActorList &actorList) + { + //Main::get().getCellController()->readAnimFlags(actorList); + } + }; +} + +#endif //OPENMW_PROCESSORACTORANIMFLAGS_HPP diff --git a/apps/openmw/mwmp/processors/actor/ProcessorActorAnimPlay.hpp b/apps/openmw/mwmp/processors/actor/ProcessorActorAnimPlay.hpp new file mode 100644 index 000000000..625c642b9 --- /dev/null +++ b/apps/openmw/mwmp/processors/actor/ProcessorActorAnimPlay.hpp @@ -0,0 +1,30 @@ +// +// Created by koncord on 18.04.17. +// + +#ifndef OPENMW_PROCESSORACTORANIMPLAY_HPP +#define OPENMW_PROCESSORACTORANIMPLAY_HPP + + +#include "apps/openmw/mwmp/ActorProcessor.hpp" +#include "apps/openmw/mwmp/Main.hpp" +#include "apps/openmw/mwmp/CellController.hpp" + +namespace mwmp +{ + class ProcessorActorAnimPlay : public ActorProcessor + { + public: + ProcessorActorAnimPlay() + { + BPP_INIT(ID_ACTOR_ANIM_PLAY); + } + + virtual void Do(ActorPacket &packet, ActorList &actorList) + { + //Main::get().getCellController()->readAnimPlay(actorList); + } + }; +} + +#endif //OPENMW_PROCESSORACTORANIMPLAY_HPP diff --git a/apps/openmw/mwmp/processors/actor/ProcessorActorAttack.hpp b/apps/openmw/mwmp/processors/actor/ProcessorActorAttack.hpp new file mode 100644 index 000000000..66cb95a0e --- /dev/null +++ b/apps/openmw/mwmp/processors/actor/ProcessorActorAttack.hpp @@ -0,0 +1,30 @@ +// +// Created by koncord on 18.04.17. +// + +#ifndef OPENMW_PROCESSORACTORATTACK_HPP +#define OPENMW_PROCESSORACTORATTACK_HPP + + +#include "apps/openmw/mwmp/ActorProcessor.hpp" +#include "apps/openmw/mwmp/Main.hpp" +#include "apps/openmw/mwmp/CellController.hpp" + +namespace mwmp +{ + class ProcessorActorAttack : public ActorProcessor + { + public: + ProcessorActorAttack() + { + BPP_INIT(ID_ACTOR_ATTACK); + } + + virtual void Do(ActorPacket &packet, ActorList &actorList) + { + + } + }; +} + +#endif //OPENMW_PROCESSORACTORATTACK_HPP diff --git a/apps/openmw/mwmp/processors/actor/ProcessorActorAuthority.hpp b/apps/openmw/mwmp/processors/actor/ProcessorActorAuthority.hpp new file mode 100644 index 000000000..af4e0a813 --- /dev/null +++ b/apps/openmw/mwmp/processors/actor/ProcessorActorAuthority.hpp @@ -0,0 +1,33 @@ +// +// Created by koncord on 18.04.17. +// + +#ifndef OPENMW_PROCESSORACTORAUTHORITY_HPP +#define OPENMW_PROCESSORACTORAUTHORITY_HPP + + +#include "apps/openmw/mwmp/ActorProcessor.hpp" +#include "apps/openmw/mwmp/Main.hpp" +#include "apps/openmw/mwmp/CellController.hpp" + +namespace mwmp +{ + class ProcessorActorAuthority : public ActorProcessor + { + public: + ProcessorActorAuthority() + { + BPP_INIT(ID_ACTOR_AUTHORITY) + } + + virtual void Do(ActorPacket &packet, ActorList &actorList) + { + LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Received %s about %s", strPacketID.c_str(), actorList.cell.getDescription().c_str()); + + Main::get().getCellController()->initializeLocalActors(actorList.cell); + Main::get().getCellController()->getCell(actorList.cell)->updateLocal(true); + } + }; +} + +#endif //OPENMW_PROCESSORACTORAUTHORITY_HPP diff --git a/apps/openmw/mwmp/processors/actor/ProcessorActorCellChange.hpp b/apps/openmw/mwmp/processors/actor/ProcessorActorCellChange.hpp new file mode 100644 index 000000000..75bec092c --- /dev/null +++ b/apps/openmw/mwmp/processors/actor/ProcessorActorCellChange.hpp @@ -0,0 +1,30 @@ +// +// Created by koncord on 18.04.17. +// + +#ifndef OPENMW_PROCESSORACTORCELLCHANGE_HPP +#define OPENMW_PROCESSORACTORCELLCHANGE_HPP + + +#include "apps/openmw/mwmp/ActorProcessor.hpp" +#include "apps/openmw/mwmp/Main.hpp" +#include "apps/openmw/mwmp/CellController.hpp" + +namespace mwmp +{ + class ProcessorActorCellChange : public ActorProcessor + { + public: + ProcessorActorCellChange() + { + BPP_INIT(ID_ACTOR_CELL_CHANGE); + } + + virtual void Do(ActorPacket &packet, ActorList &actorList) + { + + } + }; +} + +#endif //OPENMW_PROCESSORACTORCELLCHANGE_HPP diff --git a/apps/openmw/mwmp/processors/actor/ProcessorActorList.hpp b/apps/openmw/mwmp/processors/actor/ProcessorActorList.hpp new file mode 100644 index 000000000..1d2af872f --- /dev/null +++ b/apps/openmw/mwmp/processors/actor/ProcessorActorList.hpp @@ -0,0 +1,38 @@ +// +// Created by koncord on 18.04.17. +// + +#ifndef OPENMW_PROCESSORACTORLIST_HPP +#define OPENMW_PROCESSORACTORLIST_HPP + +#include "apps/openmw/mwmp/ActorProcessor.hpp" +#include "apps/openmw/mwmp/Main.hpp" +#include "apps/openmw/mwmp/CellController.hpp" + +namespace mwmp +{ + class ProcessorActorList : public ActorProcessor + { + public: + ProcessorActorList() + { + BPP_INIT(ID_ACTOR_LIST) + } + + virtual void Do(ActorPacket &packet, ActorList &actorList) + { + MWWorld::CellStore *ptrCellStore = Main::get().getCellController()->getCellStore(actorList.cell); + + if (!ptrCellStore) return; + + LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Received %s about %s", strPacketID.c_str(), actorList.cell.getDescription().c_str()); + LOG_APPEND(Log::LOG_VERBOSE, "- action: %i", actorList.action); + + // If we've received a request for information, comply with it + if (actorList.action == mwmp::BaseActorList::REQUEST) + actorList.sendActorsInCell(ptrCellStore); + } + }; +} + +#endif //OPENMW_PROCESSORACTORLIST_HPP diff --git a/apps/openmw/mwmp/processors/actor/ProcessorActorPosition.hpp b/apps/openmw/mwmp/processors/actor/ProcessorActorPosition.hpp new file mode 100644 index 000000000..9de800520 --- /dev/null +++ b/apps/openmw/mwmp/processors/actor/ProcessorActorPosition.hpp @@ -0,0 +1,30 @@ +// +// Created by koncord on 18.04.17. +// + +#ifndef OPENMW_PROCESSORACTORPOSITION_HPP +#define OPENMW_PROCESSORACTORPOSITION_HPP + + +#include "apps/openmw/mwmp/ActorProcessor.hpp" +#include "apps/openmw/mwmp/Main.hpp" +#include "apps/openmw/mwmp/CellController.hpp" + +namespace mwmp +{ + class ProcessorActorPosition : public ActorProcessor + { + public: + ProcessorActorPosition() + { + BPP_INIT(ID_ACTOR_POSITION); + } + + virtual void Do(ActorPacket &packet, ActorList &actorList) + { + //Main::get().getCellController()->readPositions(actorList); + } + }; +} + +#endif //OPENMW_PROCESSORACTORPOSITION_HPP diff --git a/apps/openmw/mwmp/processors/actor/ProcessorActorSpeech.hpp b/apps/openmw/mwmp/processors/actor/ProcessorActorSpeech.hpp new file mode 100644 index 000000000..08a6fa18c --- /dev/null +++ b/apps/openmw/mwmp/processors/actor/ProcessorActorSpeech.hpp @@ -0,0 +1,30 @@ +// +// Created by koncord on 18.04.17. +// + +#ifndef OPENMW_PROCESSORACTORSPEECH_HPP +#define OPENMW_PROCESSORACTORSPEECH_HPP + + +#include "apps/openmw/mwmp/ActorProcessor.hpp" +#include "apps/openmw/mwmp/Main.hpp" +#include "apps/openmw/mwmp/CellController.hpp" + +namespace mwmp +{ + class ProcessorActorSpeech : public ActorProcessor + { + public: + ProcessorActorSpeech() + { + BPP_INIT(ID_ACTOR_SPEECH); + } + + virtual void Do(ActorPacket &packet, ActorList &actorList) + { + //Main::get().getCellController()->readSpeech(actorList); + } + }; +} + +#endif //OPENMW_PROCESSORACTORSPEECH_HPP diff --git a/apps/openmw/mwmp/processors/actor/ProcessorActorStatsDynamic.hpp b/apps/openmw/mwmp/processors/actor/ProcessorActorStatsDynamic.hpp new file mode 100644 index 000000000..59a44fc20 --- /dev/null +++ b/apps/openmw/mwmp/processors/actor/ProcessorActorStatsDynamic.hpp @@ -0,0 +1,30 @@ +// +// Created by koncord on 18.04.17. +// + +#ifndef OPENMW_PROCESSORACTORSTATSDYNAMIC_HPP +#define OPENMW_PROCESSORACTORSTATSDYNAMIC_HPP + + +#include "apps/openmw/mwmp/ActorProcessor.hpp" +#include "apps/openmw/mwmp/Main.hpp" +#include "apps/openmw/mwmp/CellController.hpp" + +namespace mwmp +{ + class ProcessorActorStatsDynamic : public ActorProcessor + { + public: + ProcessorActorStatsDynamic() + { + BPP_INIT(ID_ACTOR_STATS_DYNAMIC); + } + + virtual void Do(ActorPacket &packet, ActorList &actorList) + { + //Main::get().getCellController()->readStatsDynamic(actorList); + } + }; +} + +#endif //OPENMW_PROCESSORACTORSTATSDYNAMIC_HPP diff --git a/apps/openmw/mwmp/processors/actor/ProcessorActorTest.hpp b/apps/openmw/mwmp/processors/actor/ProcessorActorTest.hpp new file mode 100644 index 000000000..92f7b854f --- /dev/null +++ b/apps/openmw/mwmp/processors/actor/ProcessorActorTest.hpp @@ -0,0 +1,30 @@ +// +// Created by koncord on 18.04.17. +// + +#ifndef OPENMW_PROCESSORACTORTEST_HPP +#define OPENMW_PROCESSORACTORTEST_HPP + + +#include "apps/openmw/mwmp/ActorProcessor.hpp" +#include "apps/openmw/mwmp/Main.hpp" +#include "apps/openmw/mwmp/CellController.hpp" + +namespace mwmp +{ + class ProcessorActorTest : public ActorProcessor + { + public: + ProcessorActorTest() + { + BPP_INIT(ID_ACTOR_TEST); + } + + virtual void Do(ActorPacket &packet, ActorList &actorList) + { + + } + }; +} + +#endif //OPENMW_PROCESSORACTORTEST_HPP