2017-03-31 18:36:24 +00:00
|
|
|
//
|
|
|
|
// Created by koncord on 01.04.17.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef OPENMW_PROCESSORPLAYERCELLSTATE_HPP
|
|
|
|
#define OPENMW_PROCESSORPLAYERCELLSTATE_HPP
|
|
|
|
|
|
|
|
|
2017-04-02 21:45:41 +00:00
|
|
|
#include "apps/openmw-mp/PlayerProcessor.hpp"
|
|
|
|
#include "apps/openmw-mp/Networking.hpp"
|
|
|
|
#include "apps/openmw-mp/Script/Script.hpp"
|
2017-03-31 18:36:24 +00:00
|
|
|
#include <components/openmw-mp/Controllers/PlayerPacketController.hpp>
|
|
|
|
|
|
|
|
namespace mwmp
|
|
|
|
{
|
|
|
|
class ProcessorPlayerCellState : public PlayerProcessor
|
|
|
|
{
|
|
|
|
PlayerPacketController *playerController;
|
|
|
|
public:
|
|
|
|
ProcessorPlayerCellState()
|
|
|
|
{
|
|
|
|
BPP_INIT(ID_PLAYER_CELL_STATE)
|
2017-04-09 05:51:28 +00:00
|
|
|
playerController = Networking::get().getPlayerPacketController();
|
2017-03-31 18:36:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void Do(PlayerPacket &packet, Player &player) override
|
|
|
|
{
|
2017-05-01 16:16:46 +00:00
|
|
|
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
2017-03-31 18:36:24 +00:00
|
|
|
|
|
|
|
CellController::get()->update(&player);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif //OPENMW_PROCESSORPLAYERCELLSTATE_HPP
|