1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-24 23:23:51 +00:00
openmw-tes3mp/apps/openmw/mwmp/processors/player/ProcessorPlayerAnimFlags.hpp

32 lines
739 B
C++
Raw Normal View History

#ifndef OPENMW_PROCESSORPLAYERANIMFLAGS_HPP
#define OPENMW_PROCESSORPLAYERANIMFLAGS_HPP
2017-04-16 07:00:25 +00:00
2017-06-06 16:06:10 +00:00
#include "../PlayerProcessor.hpp"
2017-04-16 07:00:25 +00:00
namespace mwmp
{
class ProcessorPlayerAnimFlags final: public PlayerProcessor
2017-04-16 07:00:25 +00:00
{
public:
ProcessorPlayerAnimFlags()
2017-04-16 07:00:25 +00:00
{
2017-04-18 04:17:58 +00:00
BPP_INIT(ID_PLAYER_ANIM_FLAGS)
2017-04-16 07:00:25 +00:00
}
virtual void Do(PlayerPacket &packet, BasePlayer *player)
{
if (isLocal())
{
2017-05-02 19:47:58 +00:00
if (isRequest())
2017-04-18 04:17:58 +00:00
static_cast<LocalPlayer *>(player)->updateAnimFlags(true);
2017-04-16 07:00:25 +00:00
}
else if (player != 0)
static_cast<DedicatedPlayer *>(player)->setAnimFlags();
2017-04-16 07:00:25 +00:00
}
};
}
#endif //OPENMW_PROCESSORPLAYERANIMFLAGS_HPP