mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 00:49:54 +00:00
a74bf1baec
(cherry picked from commit 7748e582a8
)
32 lines
789 B
C++
32 lines
789 B
C++
#ifndef OPENMW_PROCESSORPLAYERMOMENTUM_HPP
|
|
#define OPENMW_PROCESSORPLAYERMOMENTUM_HPP
|
|
|
|
|
|
#include "../PlayerProcessor.hpp"
|
|
|
|
namespace mwmp
|
|
{
|
|
class ProcessorPlayerMomentum final: public PlayerProcessor
|
|
{
|
|
public:
|
|
ProcessorPlayerMomentum()
|
|
{
|
|
BPP_INIT(ID_PLAYER_MOMENTUM)
|
|
}
|
|
|
|
virtual void Do(PlayerPacket &packet, BasePlayer *player)
|
|
{
|
|
if (!isLocal()) return;
|
|
|
|
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received ID_PLAYER_MOMENTUM about LocalPlayer from server");
|
|
|
|
if (!isRequest())
|
|
{
|
|
LocalPlayer &localPlayer = static_cast<LocalPlayer&>(*player);
|
|
localPlayer.setMomentum();
|
|
}
|
|
}
|
|
};
|
|
}
|
|
|
|
#endif //OPENMW_PROCESSORPLAYERMOMENTUM_HPP
|