2018-01-30 14:01:33 +00:00
|
|
|
#ifndef OPENMW_PROCESSORPLAYERMOMENTUM_HPP
|
|
|
|
#define OPENMW_PROCESSORPLAYERMOMENTUM_HPP
|
|
|
|
|
|
|
|
|
|
|
|
#include "../PlayerProcessor.hpp"
|
|
|
|
|
|
|
|
namespace mwmp
|
|
|
|
{
|
2019-10-24 19:16:17 +00:00
|
|
|
class ProcessorPlayerMomentum final: public PlayerProcessor
|
2018-01-30 14:01:33 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
ProcessorPlayerMomentum()
|
|
|
|
{
|
|
|
|
BPP_INIT(ID_PLAYER_MOMENTUM)
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual void Do(PlayerPacket &packet, BasePlayer *player)
|
|
|
|
{
|
|
|
|
if (!isLocal()) return;
|
|
|
|
|
2019-08-19 18:39:33 +00:00
|
|
|
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received ID_PLAYER_MOMENTUM about LocalPlayer from server");
|
2018-01-30 14:01:33 +00:00
|
|
|
|
|
|
|
if (!isRequest())
|
|
|
|
{
|
|
|
|
LocalPlayer &localPlayer = static_cast<LocalPlayer&>(*player);
|
2018-04-29 20:47:17 +00:00
|
|
|
localPlayer.setMomentum();
|
2018-01-30 14:01:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //OPENMW_PROCESSORPLAYERMOMENTUM_HPP
|