1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 22:49:55 +00:00
openmw-tes3mp/apps/openmw/mwmp/BaseClientPacketProcessor.hpp
2017-04-18 15:05:39 +08:00

43 lines
887 B
C++

//
// Created by koncord on 18.04.17.
//
#ifndef OPENMW_BASECLIENTPACKETPROCESSOR_HPP
#define OPENMW_BASECLIENTPACKETPROCESSOR_HPP
#include <components/openmw-mp/Base/BasePacketProcessor.hpp>
#include "LocalPlayer.hpp"
#include "DedicatedPlayer.hpp"
namespace mwmp
{
class BaseClientPacketProcessor : public BasePacketProcessor
{
public:
static void SetServerAddr(RakNet::SystemAddress addr)
{
serverAddr = addr;
}
protected:
inline bool isRequest()
{
return request;
}
inline bool isLocal()
{
return guid == myGuid;
}
LocalPlayer *getLocalPlayer();
protected:
static RakNet::RakNetGUID guid, myGuid;
static RakNet::SystemAddress serverAddr;
static bool request;
};
}
#endif //OPENMW_BASECLIENTPACKETPROCESSOR_HPP