mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 04:19:55 +00:00
33 lines
817 B
C++
33 lines
817 B
C++
#ifndef OPENMW_PROCESSORPLAYERCELLCHANGE_HPP
|
|
#define OPENMW_PROCESSORPLAYERCELLCHANGE_HPP
|
|
|
|
|
|
#include "../PlayerProcessor.hpp"
|
|
|
|
namespace mwmp
|
|
{
|
|
class ProcessorPlayerCellChange : public PlayerProcessor
|
|
{
|
|
public:
|
|
ProcessorPlayerCellChange()
|
|
{
|
|
BPP_INIT(ID_PLAYER_CELL_CHANGE)
|
|
}
|
|
|
|
virtual void Do(PlayerPacket &packet, BasePlayer *player)
|
|
{
|
|
if (isLocal())
|
|
{
|
|
if (isRequest())
|
|
static_cast<LocalPlayer *>(player)->updateCell(true);
|
|
else
|
|
static_cast<LocalPlayer *>(player)->setCell();
|
|
}
|
|
else if (player != 0)
|
|
static_cast<DedicatedPlayer*>(player)->setCell();
|
|
}
|
|
};
|
|
}
|
|
|
|
|
|
#endif //OPENMW_PROCESSORPLAYERCELLCHANGE_HPP
|