[General] Remove ActorHeadRotation packet because it would be too spammy
parent
2872675f5e
commit
ca8fd1aa72
@ -1,29 +0,0 @@
|
||||
#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
|
@ -1,48 +0,0 @@
|
||||
#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);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
#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
|
Loading…
Reference in New Issue