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

30 lines
805 B
C++
Raw Normal View History

#ifndef OPENMW_PROCESSORPLAYERANIMPLAY_HPP
#define OPENMW_PROCESSORPLAYERANIMPLAY_HPP
2017-06-06 16:06:10 +00:00
#include "../PlayerProcessor.hpp"
namespace mwmp
{
class ProcessorPlayerAnimPlay final: public PlayerProcessor
{
public:
ProcessorPlayerAnimPlay()
{
BPP_INIT(ID_PLAYER_ANIM_PLAY)
}
virtual void Do(PlayerPacket &packet, BasePlayer *player)
{
if (isLocal())
{
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received ID_PLAYER_ANIM_PLAY about LocalPlayer from server");
static_cast<LocalPlayer*>(player)->playAnimation();
}
else if (player != 0)
static_cast<DedicatedPlayer*>(player)->playAnimation();
}
};
}
#endif //OPENMW_PROCESSORPLAYERANIMPLAY_HPP