openmw-tes3coop/apps/openmw/mwmp/processors/player/ProcessorPlayerDrawState.hpp

36 lines
782 B
C++
Raw Normal View History

2017-04-16 07:00:25 +00:00
//
// Created by koncord on 16.04.17.
//
#ifndef OPENMW_PROCESSORPLAYERDRAWSTATE_HPP
#define OPENMW_PROCESSORPLAYERDRAWSTATE_HPP
#include "apps/openmw/mwmp/PlayerProcessor.hpp"
namespace mwmp
{
class ProcessorPlayerDrawState : public PlayerProcessor
{
public:
ProcessorPlayerDrawState()
{
BPP_INIT(ID_PLAYER_DRAWSTATE)
}
virtual void Do(PlayerPacket &packet, BasePlayer *player)
{
if (isLocal())
{
if(isRequest())
static_cast<LocalPlayer *>(player)->updateDrawStateAndFlags(true);
}
else
static_cast<DedicatedPlayer *>(player)->updateDrawState();
}
};
}
#endif //OPENMW_PROCESSORPLAYERDRAWSTATE_HPP