openmw-tes3coop/apps/openmw/mwmp/processors/player/ProcessorPlayerAnimFlags.hpp

36 lines
793 B
C++
Raw Normal View History

2017-04-16 07:00:25 +00:00
//
// Created by koncord on 16.04.17.
//
#ifndef OPENMW_PROCESSORPLAYERANIMFLAGS_HPP
#define OPENMW_PROCESSORPLAYERANIMFLAGS_HPP
2017-04-16 07:00:25 +00:00
#include "apps/openmw/mwmp/PlayerProcessor.hpp"
namespace mwmp
{
class ProcessorPlayerAnimFlags : 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)
2017-04-18 04:17:58 +00:00
static_cast<DedicatedPlayer *>(player)->updateAnimFlags();
2017-04-16 07:00:25 +00:00
}
};
}
#endif //OPENMW_PROCESSORPLAYERANIMFLAGS_HPP