[General] Add placeholders for 7 new ActorPackets
parent
9852076590
commit
0d196af685
@ -0,0 +1,29 @@
|
||||
#ifndef OPENMW_PROCESSORACTORANIMPLAY_HPP
|
||||
#define OPENMW_PROCESSORACTORANIMPLAY_HPP
|
||||
|
||||
#include "apps/openmw-mp/ActorProcessor.hpp"
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class ProcessorActorAnimPlay : public ActorProcessor
|
||||
{
|
||||
public:
|
||||
ProcessorActorAnimPlay()
|
||||
{
|
||||
BPP_INIT(ID_ACTOR_ANIM_PLAY)
|
||||
}
|
||||
|
||||
void Do(ActorPacket &packet, Player &player, BaseActorList &actorList) override
|
||||
{
|
||||
// Send only to players who have the cell loaded
|
||||
Cell *serverCell = CellController::get()->getCell(&actorList.cell);
|
||||
|
||||
if (serverCell != nullptr)
|
||||
serverCell->sendToLoaded(&packet, &actorList);
|
||||
|
||||
//Script::Call<Script::CallbackIdentity("OnActorAnimPlay")>(player.getId(), actorList.cell.getDescription().c_str());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PROCESSORACTORANIMPLAY_HPP
|
@ -0,0 +1,29 @@
|
||||
#ifndef OPENMW_PROCESSORACTORATTACK_HPP
|
||||
#define OPENMW_PROCESSORACTORATTACK_HPP
|
||||
|
||||
#include "apps/openmw-mp/ActorProcessor.hpp"
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class ProcessorActorAttack : public ActorProcessor
|
||||
{
|
||||
public:
|
||||
ProcessorActorAttack()
|
||||
{
|
||||
BPP_INIT(ID_ACTOR_ATTACK)
|
||||
}
|
||||
|
||||
void Do(ActorPacket &packet, Player &player, BaseActorList &actorList) override
|
||||
{
|
||||
// Send only to players who have the cell loaded
|
||||
Cell *serverCell = CellController::get()->getCell(&actorList.cell);
|
||||
|
||||
if (serverCell != nullptr)
|
||||
serverCell->sendToLoaded(&packet, &actorList);
|
||||
|
||||
//Script::Call<Script::CallbackIdentity("OnActorAttack")>(player.getId(), actorList.cell.getDescription().c_str());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PROCESSORACTORATTACK_HPP
|
@ -0,0 +1,24 @@
|
||||
#ifndef OPENMW_PROCESSORACTORCELLCHANGE_HPP
|
||||
#define OPENMW_PROCESSORACTORCELLCHANGE_HPP
|
||||
|
||||
#include "apps/openmw-mp/ActorProcessor.hpp"
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class ProcessorActorCellChange : public ActorProcessor
|
||||
{
|
||||
public:
|
||||
ProcessorActorCellChange()
|
||||
{
|
||||
BPP_INIT(ID_ACTOR_CELL_CHANGE)
|
||||
}
|
||||
|
||||
void Do(ActorPacket &packet, Player &player, BaseActorList &actorList) override
|
||||
{
|
||||
// Send this to everyone
|
||||
packet.Send(true);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PROCESSORACTORCELLCHANGE_HPP
|
@ -0,0 +1,29 @@
|
||||
#ifndef OPENMW_PROCESSORACTORDRAWSTATE_HPP
|
||||
#define OPENMW_PROCESSORACTORDRAWSTATE_HPP
|
||||
|
||||
#include "apps/openmw-mp/ActorProcessor.hpp"
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class ProcessorActorDrawState : public ActorProcessor
|
||||
{
|
||||
public:
|
||||
ProcessorActorDrawState()
|
||||
{
|
||||
BPP_INIT(ID_ACTOR_DRAW_STATE)
|
||||
}
|
||||
|
||||
void Do(ActorPacket &packet, Player &player, BaseActorList &actorList) override
|
||||
{
|
||||
// Send only to players who have the cell loaded
|
||||
Cell *serverCell = CellController::get()->getCell(&actorList.cell);
|
||||
|
||||
if (serverCell != nullptr)
|
||||
serverCell->sendToLoaded(&packet, &actorList);
|
||||
|
||||
//Script::Call<Script::CallbackIdentity("OnActorDrawState")>(player.getId(), actorList.cell.getDescription().c_str());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PROCESSORACTORDRAWSTATE_HPP
|
@ -0,0 +1,29 @@
|
||||
#ifndef OPENMW_PROCESSORACTORDYNAMICSTATS_HPP
|
||||
#define OPENMW_PROCESSORACTORDYNAMICSTATS_HPP
|
||||
|
||||
#include "apps/openmw-mp/ActorProcessor.hpp"
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class ProcessorActorDynamicStats : public ActorProcessor
|
||||
{
|
||||
public:
|
||||
ProcessorActorDynamicStats()
|
||||
{
|
||||
BPP_INIT(ID_ACTOR_DYNAMICSTATS)
|
||||
}
|
||||
|
||||
void Do(ActorPacket &packet, Player &player, BaseActorList &actorList) override
|
||||
{
|
||||
// Send only to players who have the cell loaded
|
||||
Cell *serverCell = CellController::get()->getCell(&actorList.cell);
|
||||
|
||||
if (serverCell != nullptr)
|
||||
serverCell->sendToLoaded(&packet, &actorList);
|
||||
|
||||
//Script::Call<Script::CallbackIdentity("OnActorDynamicStats")>(player.getId(), actorList.cell.getDescription().c_str());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PROCESSORACTORDYNAMICSTATS_HPP
|
@ -0,0 +1,29 @@
|
||||
#ifndef OPENMW_PROCESSORACTORHEADROTATION_HPP
|
||||
#define OPENMW_PROCESSORACTORHEADROTATION_HPP
|
||||
|
||||
#include "apps/openmw-mp/ActorProcessor.hpp"
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class ProcessorActorHeadRotation : public ActorProcessor
|
||||
{
|
||||
public:
|
||||
ProcessorActorHeadRotation()
|
||||
{
|
||||
BPP_INIT(ID_ACTOR_HEAD_ROTATION)
|
||||
}
|
||||
|
||||
void Do(ActorPacket &packet, Player &player, BaseActorList &actorList) override
|
||||
{
|
||||
// Send only to players who have the cell loaded
|
||||
Cell *serverCell = CellController::get()->getCell(&actorList.cell);
|
||||
|
||||
if (serverCell != nullptr)
|
||||
serverCell->sendToLoaded(&packet, &actorList);
|
||||
|
||||
//Script::Call<Script::CallbackIdentity("OnActorHeadRotation")>(player.getId(), actorList.cell.getDescription().c_str());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PROCESSORACTORHEADROTATION_HPP
|
@ -0,0 +1,29 @@
|
||||
#ifndef OPENMW_PROCESSORACTORSPEECH_HPP
|
||||
#define OPENMW_PROCESSORACTORSPEECH_HPP
|
||||
|
||||
#include "apps/openmw-mp/ActorProcessor.hpp"
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class ProcessorActorSpeech : public ActorProcessor
|
||||
{
|
||||
public:
|
||||
ProcessorActorSpeech()
|
||||
{
|
||||
BPP_INIT(ID_ACTOR_SPEECH)
|
||||
}
|
||||
|
||||
void Do(ActorPacket &packet, Player &player, BaseActorList &actorList) override
|
||||
{
|
||||
// Send only to players who have the cell loaded
|
||||
Cell *serverCell = CellController::get()->getCell(&actorList.cell);
|
||||
|
||||
if (serverCell != nullptr)
|
||||
serverCell->sendToLoaded(&packet, &actorList);
|
||||
|
||||
//Script::Call<Script::CallbackIdentity("OnActorSpeech")>(player.getId(), actorList.cell.getDescription().c_str());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PROCESSORACTORSPEECH_HPP
|
@ -0,0 +1,48 @@
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include "PacketActorAnimPlay.hpp"
|
||||
|
||||
using namespace mwmp;
|
||||
|
||||
PacketActorAnimPlay::PacketActorAnimPlay(RakNet::RakPeerInterface *peer) : ActorPacket(peer)
|
||||
{
|
||||
packetID = ID_ACTOR_ANIM_PLAY;
|
||||
}
|
||||
|
||||
void PacketActorAnimPlay::Packet(RakNet::BitStream *bs, bool send)
|
||||
{
|
||||
ActorPacket::Packet(bs, send);
|
||||
|
||||
if (!send)
|
||||
actorList->baseActors.clear();
|
||||
else
|
||||
actorList->count = (unsigned int)(actorList->baseActors.size());
|
||||
|
||||
RW(actorList->count, send);
|
||||
|
||||
RW(actorList->cell.mData.mFlags, send);
|
||||
RW(actorList->cell.mData.mX, send);
|
||||
RW(actorList->cell.mData.mY, send);
|
||||
RW(actorList->cell.mName, send);
|
||||
|
||||
BaseActor actor;
|
||||
|
||||
for (unsigned int i = 0; i < actorList->count; i++)
|
||||
{
|
||||
if (send)
|
||||
{
|
||||
actor = actorList->baseActors.at(i);
|
||||
}
|
||||
|
||||
RW(actor.refId, send);
|
||||
RW(actor.refNumIndex, send);
|
||||
RW(actor.mpNum, send);
|
||||
|
||||
// TODO: Fill this in
|
||||
|
||||
if (!send)
|
||||
{
|
||||
actorList->baseActors.push_back(actor);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
#ifndef OPENMW_PACKETACTORANIMPLAY_HPP
|
||||
#define OPENMW_PACKETACTORANIMPLAY_HPP
|
||||
|
||||
#include <components/openmw-mp/Packets/Actor/ActorPacket.hpp>
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class PacketActorAnimPlay : public ActorPacket
|
||||
{
|
||||
public:
|
||||
PacketActorAnimPlay(RakNet::RakPeerInterface *peer);
|
||||
|
||||
virtual void Packet(RakNet::BitStream *bs, bool send);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PACKETACTORANIMPLAY_HPP
|
@ -0,0 +1,48 @@
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include "PacketActorAttack.hpp"
|
||||
|
||||
using namespace mwmp;
|
||||
|
||||
PacketActorAttack::PacketActorAttack(RakNet::RakPeerInterface *peer) : ActorPacket(peer)
|
||||
{
|
||||
packetID = ID_ACTOR_ATTACK;
|
||||
}
|
||||
|
||||
void PacketActorAttack::Packet(RakNet::BitStream *bs, bool send)
|
||||
{
|
||||
ActorPacket::Packet(bs, send);
|
||||
|
||||
if (!send)
|
||||
actorList->baseActors.clear();
|
||||
else
|
||||
actorList->count = (unsigned int)(actorList->baseActors.size());
|
||||
|
||||
RW(actorList->count, send);
|
||||
|
||||
RW(actorList->cell.mData.mFlags, send);
|
||||
RW(actorList->cell.mData.mX, send);
|
||||
RW(actorList->cell.mData.mY, send);
|
||||
RW(actorList->cell.mName, send);
|
||||
|
||||
BaseActor actor;
|
||||
|
||||
for (unsigned int i = 0; i < actorList->count; i++)
|
||||
{
|
||||
if (send)
|
||||
{
|
||||
actor = actorList->baseActors.at(i);
|
||||
}
|
||||
|
||||
RW(actor.refId, send);
|
||||
RW(actor.refNumIndex, send);
|
||||
RW(actor.mpNum, send);
|
||||
|
||||
// TODO: Fill this in
|
||||
|
||||
if (!send)
|
||||
{
|
||||
actorList->baseActors.push_back(actor);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
#ifndef OPENMW_PACKETACTORATTACK_HPP
|
||||
#define OPENMW_PACKETACTORATTACK_HPP
|
||||
|
||||
#include <components/openmw-mp/Packets/Actor/ActorPacket.hpp>
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class PacketActorAttack : public ActorPacket
|
||||
{
|
||||
public:
|
||||
PacketActorAttack(RakNet::RakPeerInterface *peer);
|
||||
|
||||
virtual void Packet(RakNet::BitStream *bs, bool send);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PACKETACTORATTACK_HPP
|
@ -0,0 +1,47 @@
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include "PacketActorCellChange.hpp"
|
||||
|
||||
using namespace mwmp;
|
||||
|
||||
PacketActorCellChange::PacketActorCellChange(RakNet::RakPeerInterface *peer) : ActorPacket(peer)
|
||||
{
|
||||
packetID = ID_ACTOR_CELL_CHANGE;
|
||||
}
|
||||
|
||||
void PacketActorCellChange::Packet(RakNet::BitStream *bs, bool send)
|
||||
{
|
||||
ActorPacket::Packet(bs, send);
|
||||
|
||||
if (!send)
|
||||
actorList->baseActors.clear();
|
||||
else
|
||||
actorList->count = (unsigned int)(actorList->baseActors.size());
|
||||
|
||||
RW(actorList->count, send);
|
||||
|
||||
RW(actorList->cell.mData.mFlags, send);
|
||||
RW(actorList->cell.mData.mX, send);
|
||||
RW(actorList->cell.mData.mY, send);
|
||||
RW(actorList->cell.mName, send);
|
||||
|
||||
BaseActor actor;
|
||||
|
||||
for (unsigned int i = 0; i < actorList->count; i++)
|
||||
{
|
||||
if (send)
|
||||
{
|
||||
actor = actorList->baseActors.at(i);
|
||||
}
|
||||
|
||||
RW(actor.refId, send);
|
||||
RW(actor.refNumIndex, send);
|
||||
RW(actor.mpNum, send);
|
||||
RW(actor.cell, send);
|
||||
|
||||
if (!send)
|
||||
{
|
||||
actorList->baseActors.push_back(actor);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
#ifndef OPENMW_PACKETACTORCELLCHANGE_HPP
|
||||
#define OPENMW_PACKETACTORCELLCHANGE_HPP
|
||||
|
||||
#include <components/openmw-mp/Packets/Actor/ActorPacket.hpp>
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class PacketActorCellChange : public ActorPacket
|
||||
{
|
||||
public:
|
||||
PacketActorCellChange(RakNet::RakPeerInterface *peer);
|
||||
|
||||
virtual void Packet(RakNet::BitStream *bs, bool send);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PACKETACTORCELLCHANGE_HPP
|
@ -0,0 +1,48 @@
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include "PacketActorDrawState.hpp"
|
||||
|
||||
using namespace mwmp;
|
||||
|
||||
PacketActorDrawState::PacketActorDrawState(RakNet::RakPeerInterface *peer) : ActorPacket(peer)
|
||||
{
|
||||
packetID = ID_ACTOR_DRAW_STATE;
|
||||
}
|
||||
|
||||
void PacketActorDrawState::Packet(RakNet::BitStream *bs, bool send)
|
||||
{
|
||||
ActorPacket::Packet(bs, send);
|
||||
|
||||
if (!send)
|
||||
actorList->baseActors.clear();
|
||||
else
|
||||
actorList->count = (unsigned int)(actorList->baseActors.size());
|
||||
|
||||
RW(actorList->count, send);
|
||||
|
||||
RW(actorList->cell.mData.mFlags, send);
|
||||
RW(actorList->cell.mData.mX, send);
|
||||
RW(actorList->cell.mData.mY, send);
|
||||
RW(actorList->cell.mName, send);
|
||||
|
||||
BaseActor actor;
|
||||
|
||||
for (unsigned int i = 0; i < actorList->count; i++)
|
||||
{
|
||||
if (send)
|
||||
{
|
||||
actor = actorList->baseActors.at(i);
|
||||
}
|
||||
|
||||
RW(actor.refId, send);
|
||||
RW(actor.refNumIndex, send);
|
||||
RW(actor.mpNum, send);
|
||||
|
||||
// TODO: Fill this in
|
||||
|
||||
if (!send)
|
||||
{
|
||||
actorList->baseActors.push_back(actor);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
#ifndef OPENMW_PACKETACTORDRAWSTATE_HPP
|
||||
#define OPENMW_PACKETACTORDRAWSTATE_HPP
|
||||
|
||||
#include <components/openmw-mp/Packets/Actor/ActorPacket.hpp>
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class PacketActorDrawState : public ActorPacket
|
||||
{
|
||||
public:
|
||||
PacketActorDrawState(RakNet::RakPeerInterface *peer);
|
||||
|
||||
virtual void Packet(RakNet::BitStream *bs, bool send);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PACKETACTORDRAWSTATE_HPP
|
@ -0,0 +1,48 @@
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include "PacketActorDynamicStats.hpp"
|
||||
|
||||
using namespace mwmp;
|
||||
|
||||
PacketActorDynamicStats::PacketActorDynamicStats(RakNet::RakPeerInterface *peer) : ActorPacket(peer)
|
||||
{
|
||||
packetID = ID_ACTOR_DYNAMICSTATS;
|
||||
}
|
||||
|
||||
void PacketActorDynamicStats::Packet(RakNet::BitStream *bs, bool send)
|
||||
{
|
||||
ActorPacket::Packet(bs, send);
|
||||
|
||||
if (!send)
|
||||
actorList->baseActors.clear();
|
||||
else
|
||||
actorList->count = (unsigned int)(actorList->baseActors.size());
|
||||
|
||||
RW(actorList->count, send);
|
||||
|
||||
RW(actorList->cell.mData.mFlags, send);
|
||||
RW(actorList->cell.mData.mX, send);
|
||||
RW(actorList->cell.mData.mY, send);
|
||||
RW(actorList->cell.mName, send);
|
||||
|
||||
BaseActor actor;
|
||||
|
||||
for (unsigned int i = 0; i < actorList->count; i++)
|
||||
{
|
||||
if (send)
|
||||
{
|
||||
actor = actorList->baseActors.at(i);
|
||||
}
|
||||
|
||||
RW(actor.refId, send);
|
||||
RW(actor.refNumIndex, send);
|
||||
RW(actor.mpNum, send);
|
||||
|
||||
// TODO: Fill this in
|
||||
|
||||
if (!send)
|
||||
{
|
||||
actorList->baseActors.push_back(actor);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
#ifndef OPENMW_PACKETACTORDYNAMICSTATS_HPP
|
||||
#define OPENMW_PACKETACTORDYNAMICSTATS_HPP
|
||||
|
||||
#include <components/openmw-mp/Packets/Actor/ActorPacket.hpp>
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class PacketActorDynamicStats : public ActorPacket
|
||||
{
|
||||
public:
|
||||
PacketActorDynamicStats(RakNet::RakPeerInterface *peer);
|
||||
|
||||
virtual void Packet(RakNet::BitStream *bs, bool send);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PACKETACTORDYNAMICSTATS_HPP
|
@ -0,0 +1,48 @@
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include "PacketActorHeadRotation.hpp"
|
||||
|
||||
using namespace mwmp;
|
||||
|
||||
PacketActorHeadRotation::PacketActorHeadRotation(RakNet::RakPeerInterface *peer) : ActorPacket(peer)
|
||||
{
|
||||
packetID = ID_ACTOR_HEAD_ROTATION;
|
||||
}
|
||||
|
||||
void PacketActorHeadRotation::Packet(RakNet::BitStream *bs, bool send)
|
||||
{
|
||||
ActorPacket::Packet(bs, send);
|
||||
|
||||
if (!send)
|
||||
actorList->baseActors.clear();
|
||||
else
|
||||
actorList->count = (unsigned int)(actorList->baseActors.size());
|
||||
|
||||
RW(actorList->count, send);
|
||||
|
||||
RW(actorList->cell.mData.mFlags, send);
|
||||
RW(actorList->cell.mData.mX, send);
|
||||
RW(actorList->cell.mData.mY, send);
|
||||
RW(actorList->cell.mName, send);
|
||||
|
||||
BaseActor actor;
|
||||
|
||||
for (unsigned int i = 0; i < actorList->count; i++)
|
||||
{
|
||||
if (send)
|
||||
{
|
||||
actor = actorList->baseActors.at(i);
|
||||
}
|
||||
|
||||
RW(actor.refId, send);
|
||||
RW(actor.refNumIndex, send);
|
||||
RW(actor.mpNum, send);
|
||||
|
||||
// TODO: Fill this in
|
||||
|
||||
if (!send)
|
||||
{
|
||||
actorList->baseActors.push_back(actor);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
#ifndef OPENMW_PACKETACTORHEADROTATION_HPP
|
||||
#define OPENMW_PACKETACTORHEADROTATION_HPP
|
||||
|
||||
#include <components/openmw-mp/Packets/Actor/ActorPacket.hpp>
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class PacketActorHeadRotation : public ActorPacket
|
||||
{
|
||||
public:
|
||||
PacketActorHeadRotation(RakNet::RakPeerInterface *peer);
|
||||
|
||||
virtual void Packet(RakNet::BitStream *bs, bool send);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PACKETACTORHEADROTATION_HPP
|
@ -0,0 +1,48 @@
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include "PacketActorSpeech.hpp"
|
||||
|
||||
using namespace mwmp;
|
||||
|
||||
PacketActorSpeech::PacketActorSpeech(RakNet::RakPeerInterface *peer) : ActorPacket(peer)
|
||||
{
|
||||
packetID = ID_ACTOR_SPEECH;
|
||||
}
|
||||
|
||||
void PacketActorSpeech::Packet(RakNet::BitStream *bs, bool send)
|
||||
{
|
||||
ActorPacket::Packet(bs, send);
|
||||
|
||||
if (!send)
|
||||
actorList->baseActors.clear();
|
||||
else
|
||||
actorList->count = (unsigned int)(actorList->baseActors.size());
|
||||
|
||||
RW(actorList->count, send);
|
||||
|
||||
RW(actorList->cell.mData.mFlags, send);
|
||||
RW(actorList->cell.mData.mX, send);
|
||||
RW(actorList->cell.mData.mY, send);
|
||||
RW(actorList->cell.mName, send);
|
||||
|
||||
BaseActor actor;
|
||||
|
||||
for (unsigned int i = 0; i < actorList->count; i++)
|
||||
{
|
||||
if (send)
|
||||
{
|
||||
actor = actorList->baseActors.at(i);
|
||||
}
|
||||
|
||||
RW(actor.refId, send);
|
||||
RW(actor.refNumIndex, send);
|
||||
RW(actor.mpNum, send);
|
||||
|
||||
// TODO: Fill this in
|
||||
|
||||
if (!send)
|
||||
{
|
||||
actorList->baseActors.push_back(actor);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
#ifndef OPENMW_PACKETACTORSPEECH_HPP
|
||||
#define OPENMW_PACKETACTORSPEECH_HPP
|
||||
|
||||
#include <components/openmw-mp/Packets/Actor/ActorPacket.hpp>
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class PacketActorSpeech : public ActorPacket
|
||||
{
|
||||
public:
|
||||
PacketActorSpeech(RakNet::RakPeerInterface *peer);
|
||||
|
||||
virtual void Packet(RakNet::BitStream *bs, bool send);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PACKETACTORSPEECH_HPP
|
Loading…
Reference in New Issue