1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 15:49:55 +00:00
openmw-tes3mp/apps/openmw/mwmp/processors/player/ProcessorPlayerAnimFlags.hpp
David Cernat e70faf1016 [Client] Fix crashes in PlayerProcessors from NULL players
Also rename ProcessorPlayerDrawState into ProcessorPlayerAnimFlags
2017-04-24 01:46:27 +03:00

35 lines
792 B
C++

//
// Created by koncord on 16.04.17.
//
#ifndef OPENMW_PROCESSORPLAYERANIMFLAGS_HPP
#define OPENMW_PROCESSORPLAYERANIMFLAGS_HPP
#include "apps/openmw/mwmp/PlayerProcessor.hpp"
namespace mwmp
{
class ProcessorPlayerAnimFlags : public PlayerProcessor
{
public:
ProcessorPlayerAnimFlags()
{
BPP_INIT(ID_PLAYER_ANIM_FLAGS)
}
virtual void Do(PlayerPacket &packet, BasePlayer *player)
{
if (isLocal())
{
if(isRequest())
static_cast<LocalPlayer *>(player)->updateAnimFlags(true);
}
else if (player != 0)
static_cast<DedicatedPlayer *>(player)->updateAnimFlags();
}
};
}
#endif //OPENMW_PROCESSORPLAYERANIMFLAGS_HPP