2017-04-16 07:00:25 +00:00
|
|
|
#ifndef OPENMW_PROCESSORPLAYERCELLCHANGE_HPP
|
|
|
|
#define OPENMW_PROCESSORPLAYERCELLCHANGE_HPP
|
|
|
|
|
|
|
|
|
2017-06-06 16:06:10 +00:00
|
|
|
#include "../PlayerProcessor.hpp"
|
2017-04-16 07:00:25 +00:00
|
|
|
|
|
|
|
namespace mwmp
|
|
|
|
{
|
2019-10-24 19:16:17 +00:00
|
|
|
class ProcessorPlayerCellChange final: public PlayerProcessor
|
2017-04-16 07:00:25 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
ProcessorPlayerCellChange()
|
|
|
|
{
|
|
|
|
BPP_INIT(ID_PLAYER_CELL_CHANGE)
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual void Do(PlayerPacket &packet, BasePlayer *player)
|
|
|
|
{
|
|
|
|
if (isLocal())
|
|
|
|
{
|
2021-03-25 01:39:13 +00:00
|
|
|
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received ID_PLAYER_CELL_CHANGE from server about me");
|
|
|
|
|
2017-04-16 07:00:25 +00:00
|
|
|
if (isRequest())
|
|
|
|
static_cast<LocalPlayer *>(player)->updateCell(true);
|
|
|
|
else
|
|
|
|
static_cast<LocalPlayer *>(player)->setCell();
|
|
|
|
}
|
2017-04-23 22:46:27 +00:00
|
|
|
else if (player != 0)
|
2017-05-14 07:52:44 +00:00
|
|
|
static_cast<DedicatedPlayer*>(player)->setCell();
|
2017-04-16 07:00:25 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif //OPENMW_PROCESSORPLAYERCELLCHANGE_HPP
|