mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 04:49:54 +00:00
34 lines
894 B
C++
34 lines
894 B
C++
#ifndef OPENMW_PROCESSORPLAYERSHAPESHIFT_HPP
|
|
#define OPENMW_PROCESSORPLAYERSHAPESHIFT_HPP
|
|
|
|
#include "../PlayerProcessor.hpp"
|
|
|
|
namespace mwmp
|
|
{
|
|
class ProcessorPlayerShapeshift : public PlayerProcessor
|
|
{
|
|
public:
|
|
ProcessorPlayerShapeshift()
|
|
{
|
|
BPP_INIT(ID_PLAYER_SHAPESHIFT)
|
|
}
|
|
|
|
virtual void Do(PlayerPacket &packet, BasePlayer *player)
|
|
{
|
|
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received ID_PLAYER_SHAPESHIFT from server");
|
|
|
|
if (isLocal())
|
|
{
|
|
LOG_APPEND(Log::LOG_INFO, "- Packet was about LocalPlayer");
|
|
|
|
static_cast<LocalPlayer *>(player)->setShapeshift();
|
|
}
|
|
else if (player != 0)
|
|
{
|
|
static_cast<DedicatedPlayer *>(player)->setShapeshift();
|
|
}
|
|
}
|
|
};
|
|
}
|
|
|
|
#endif //OPENMW_PROCESSORPLAYERSHAPESHIFT_HPP
|