[General] Add placeholder for ObjectActivate packet

remotes/1728160796594174844/tmp_0.7.0-alpha
David Cernat 7 years ago
parent 61da0d2475
commit 81b160cae8

@ -120,15 +120,16 @@ source_group(tes3mp-server\\processors\\player FILES ${PROCESSORS_PLAYER})
set(PROCESSORS_OBJECT
processors/object/ProcessorContainer.hpp processors/object/ProcessorDoorState.hpp
processors/object/ProcessorMusicPlay.hpp processors/object/ProcessorObjectAnimPlay.hpp
processors/object/ProcessorObjectDelete.hpp processors/object/ProcessorObjectLock.hpp
processors/object/ProcessorObjectMove.hpp processors/object/ProcessorObjectPlace.hpp
processors/object/ProcessorObjectRotate.hpp processors/object/ProcessorObjectScale.hpp
processors/object/ProcessorObjectSpawn.hpp processors/object/ProcessorObjectState.hpp
processors/object/ProcessorObjectTrap.hpp processors/object/ProcessorScriptLocalShort.hpp
processors/object/ProcessorScriptLocalFloat.hpp processors/object/ProcessorScriptMemberShort.hpp
processors/object/ProcessorScriptMemberFloat.hpp processors/object/ProcessorScriptGlobalShort.hpp
processors/object/ProcessorScriptGlobalFloat.hpp processors/object/ProcessorVideoPlay.hpp
processors/object/ProcessorMusicPlay.hpp processors/object/ProcessorObjectActivate.hpp
processors/object/ProcessorObjectAnimPlay.hpp processors/object/ProcessorObjectDelete.hpp
processors/object/ProcessorObjectLock.hpp processors/object/ProcessorObjectMove.hpp
processors/object/ProcessorObjectPlace.hpp processors/object/ProcessorObjectRotate.hpp
processors/object/ProcessorObjectScale.hpp processors/object/ProcessorObjectSpawn.hpp
processors/object/ProcessorObjectState.hpp processors/object/ProcessorObjectTrap.hpp
processors/object/ProcessorScriptLocalShort.hpp processors/object/ProcessorScriptLocalFloat.hpp
processors/object/ProcessorScriptMemberShort.hpp processors/object/ProcessorScriptMemberFloat.hpp
processors/object/ProcessorScriptGlobalShort.hpp processors/object/ProcessorScriptGlobalFloat.hpp
processors/object/ProcessorVideoPlay.hpp
)
source_group(tes3mp-server\\processors\\object FILES ${PROCESSORS_OBJECT})

@ -182,6 +182,7 @@ public:
{"OnCellDeletion", Function<void, const char*>()},
{"OnContainer", Function<void, unsigned short, const char*>()},
{"OnDoorState", Function<void, unsigned short, const char*>()},
{"OnObjectActivate", Function<void, unsigned short, const char*>()},
{"OnObjectPlace", Function<void, unsigned short, const char*>()},
{"OnObjectState", Function<void, unsigned short, const char*>()},
{"OnObjectSpawn", Function<void, unsigned short, const char*>()},

@ -56,6 +56,7 @@
#include "object/ProcessorContainer.hpp"
#include "object/ProcessorDoorState.hpp"
#include "object/ProcessorMusicPlay.hpp"
#include "object/ProcessorObjectActivate.hpp"
#include "object/ProcessorObjectAnimPlay.hpp"
#include "object/ProcessorObjectDelete.hpp"
#include "object/ProcessorObjectPlace.hpp"
@ -133,6 +134,7 @@ void ProcessorInitializer()
ObjectProcessor::AddProcessor(new ProcessorContainer());
ObjectProcessor::AddProcessor(new ProcessorDoorState());
ObjectProcessor::AddProcessor(new ProcessorMusicPlay());
ObjectProcessor::AddProcessor(new ProcessorObjectActivate());
ObjectProcessor::AddProcessor(new ProcessorObjectAnimPlay());
ObjectProcessor::AddProcessor(new ProcessorObjectDelete());
ObjectProcessor::AddProcessor(new ProcessorObjectLock());

@ -0,0 +1,26 @@
#ifndef OPENMW_PROCESSOROBJECTACTIVATE_HPP
#define OPENMW_PROCESSOROBJECTACTIVATE_HPP
#include "../ObjectProcessor.hpp"
#include <apps/openmw-mp/Networking.hpp>
namespace mwmp
{
class ProcessorObjectActivate : public ObjectProcessor
{
public:
ProcessorObjectActivate()
{
BPP_INIT(ID_OBJECT_ACTIVATE)
}
void Do(ObjectPacket &packet, Player &player, BaseObjectList &objectList) override
{
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
Script::Call<Script::CallbackIdentity("OnObjectActivate")>(player.getId(), objectList.cell.getDescription().c_str());
}
};
}
#endif //OPENMW_PROCESSOROBJECTACTIVATE_HPP

@ -50,6 +50,7 @@
#include "object/ProcessorDoorDestination.hpp"
#include "object/ProcessorDoorState.hpp"
#include "object/ProcessorMusicPlay.hpp"
#include "object/ProcessorObjectActivate.hpp"
#include "object/ProcessorObjectAnimPlay.hpp"
#include "object/ProcessorObjectAttach.hpp"
#include "object/ProcessorObjectCollision.hpp"
@ -147,6 +148,7 @@ void ProcessorInitializer()
ObjectProcessor::AddProcessor(new ProcessorDoorDestination());
ObjectProcessor::AddProcessor(new ProcessorDoorState());
ObjectProcessor::AddProcessor(new ProcessorMusicPlay());
ObjectProcessor::AddProcessor(new ProcessorObjectActivate());
ObjectProcessor::AddProcessor(new ProcessorObjectAnimPlay());
ObjectProcessor::AddProcessor(new ProcessorObjectAttach());
ObjectProcessor::AddProcessor(new ProcessorObjectCollision());

@ -0,0 +1,26 @@
#ifndef OPENMW_PROCESSOROBJECTACTIVATE_HPP
#define OPENMW_PROCESSOROBJECTACTIVATE_HPP
#include "BaseObjectProcessor.hpp"
namespace mwmp
{
class ProcessorObjectActivate : public BaseObjectProcessor
{
public:
ProcessorObjectActivate()
{
BPP_INIT(ID_OBJECT_ACTIVATE)
}
virtual void Do(ObjectPacket &packet, ObjectList &objectList)
{
BaseObjectProcessor::Do(packet, objectList);
//objectList.activateObjects(ptrCellStore);
}
};
}
#endif //OPENMW_PROCESSOROBJECTACTIVATE_HPP

@ -191,11 +191,12 @@ add_component_dir (openmw-mp/Packets/Player
add_component_dir (openmw-mp/Packets/Object
ObjectPacket
PacketConsoleCommand PacketContainer PacketObjectAnimPlay PacketObjectAttach PacketObjectCollision
PacketObjectDelete PacketDoorDestination PacketDoorState PacketObjectLock PacketObjectMove PacketObjectPlace
PacketObjectReset PacketObjectRotate PacketObjectScale PacketObjectSpawn PacketObjectState PacketObjectTrap
PacketMusicPlay PacketVideoPlay PacketScriptLocalShort PacketScriptLocalFloat PacketScriptMemberShort
PacketScriptMemberFloat PacketScriptGlobalShort PacketScriptGlobalFloat
PacketConsoleCommand PacketContainer PacketObjectActivate PacketObjectAnimPlay PacketObjectAttach
PacketObjectCollision PacketObjectDelete PacketDoorDestination PacketDoorState PacketObjectLock
PacketObjectMove PacketObjectPlace PacketObjectReset PacketObjectRotate PacketObjectScale
PacketObjectSpawn PacketObjectState PacketObjectTrap PacketMusicPlay PacketVideoPlay PacketScriptLocalShort
PacketScriptLocalFloat PacketScriptMemberShort PacketScriptMemberFloat PacketScriptGlobalShort
PacketScriptGlobalFloat
)
add_component_dir (openmw-mp/Packets/Worldstate

@ -1,3 +1,4 @@
#include "../Packets/Object/PacketObjectActivate.hpp"
#include "../Packets/Object/PacketObjectAnimPlay.hpp"
#include "../Packets/Object/PacketObjectAttach.hpp"
#include "../Packets/Object/PacketObjectCollision.hpp"
@ -38,6 +39,7 @@ inline void AddPacket(mwmp::ObjectPacketController::packets_t *packets, RakNet::
mwmp::ObjectPacketController::ObjectPacketController(RakNet::RakPeerInterface *peer)
{
AddPacket<PacketObjectActivate>(&packets, peer);
AddPacket<PacketObjectAnimPlay>(&packets, peer);
AddPacket<PacketObjectAttach>(&packets, peer);
AddPacket<PacketObjectCollision>(&packets, peer);

@ -73,6 +73,7 @@ enum GameMessages
ID_ACTOR_SPEECH,
ID_ACTOR_STATS_DYNAMIC,
ID_OBJECT_ACTIVATE,
ID_OBJECT_ANIM_PLAY,
ID_OBJECT_ATTACH,
ID_OBJECT_COLLISION,

@ -0,0 +1,15 @@
#include <components/openmw-mp/NetworkMessages.hpp>
#include "PacketObjectActivate.hpp"
using namespace mwmp;
PacketObjectActivate::PacketObjectActivate(RakNet::RakPeerInterface *peer) : ObjectPacket(peer)
{
packetID = ID_OBJECT_ACTIVATE;
hasCellData = true;
}
void PacketObjectActivate::Object(BaseObject &baseObject, bool send)
{
ObjectPacket::Object(baseObject, send);
}

@ -0,0 +1,17 @@
#ifndef OPENMW_PACKETOBJECTACTIVATE_HPP
#define OPENMW_PACKETOBJECTACTIVATE_HPP
#include <components/openmw-mp/Packets/Object/ObjectPacket.hpp>
namespace mwmp
{
class PacketObjectActivate : public ObjectPacket
{
public:
PacketObjectActivate(RakNet::RakPeerInterface *peer);
virtual void Object(BaseObject &baseObject, bool send);
};
}
#endif //OPENMW_PACKETOBJECTACTIVATE_HPP
Loading…
Cancel
Save