[Client] Add & init Actor processors

pull/176/merge
Koncord 8 years ago
parent 7ec897a829
commit 2c62c501f6

@ -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());
}

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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
Loading…
Cancel
Save