forked from teamnwah/openmw-tes3coop
[General] Repurpose GameConsole packet as GameSettings & add difficulty to it
parent
df67ae4689
commit
ebf7740969
@ -1,30 +0,0 @@
|
||||
//
|
||||
// Created by koncord on 16.04.17.
|
||||
//
|
||||
|
||||
#ifndef OPENMW_PROCESSORGAMECONSOLE_HPP
|
||||
#define OPENMW_PROCESSORGAMECONSOLE_HPP
|
||||
|
||||
|
||||
#include "../PlayerProcessor.hpp"
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class ProcessorGameConsole : public PlayerProcessor
|
||||
{
|
||||
public:
|
||||
ProcessorGameConsole()
|
||||
{
|
||||
BPP_INIT(ID_GAME_CONSOLE)
|
||||
}
|
||||
|
||||
virtual void Do(PlayerPacket &packet, BasePlayer *player)
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif //OPENMW_PROCESSORGAMECONSOLE_HPP
|
@ -0,0 +1,23 @@
|
||||
#ifndef OPENMW_PROCESSORGAMESETTINGS_HPP
|
||||
#define OPENMW_PROCESSORGAMESETTINGS_HPP
|
||||
|
||||
#include "../PlayerProcessor.hpp"
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class ProcessorGameSettings : public PlayerProcessor
|
||||
{
|
||||
public:
|
||||
ProcessorGameSettings()
|
||||
{
|
||||
BPP_INIT(ID_GAME_SETTINGS)
|
||||
}
|
||||
|
||||
virtual void Do(PlayerPacket &packet, BasePlayer *player)
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PROCESSORGAMESETTINGS_HPP
|
@ -1,29 +0,0 @@
|
||||
//
|
||||
// Created by koncord on 04.11.16.
|
||||
//
|
||||
|
||||
#ifndef OPENMW_PACKETCONSOLE_HPP
|
||||
#define OPENMW_PACKETCONSOLE_HPP
|
||||
|
||||
#include <components/openmw-mp/Packets/Player/PlayerPacket.hpp>
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class PacketConsole: public PlayerPacket
|
||||
{
|
||||
public:
|
||||
PacketConsole(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
|
||||
{
|
||||
packetID = ID_GAME_CONSOLE;
|
||||
orderChannel = CHANNEL_SYSTEM;
|
||||
}
|
||||
void Packet(RakNet::BitStream *bs, bool send)
|
||||
{
|
||||
PlayerPacket::Packet(bs, send);
|
||||
RW(player->consoleAllowed, send);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PACKETCONSOLE_HPP
|
@ -0,0 +1,18 @@
|
||||
#include "PacketGameSettings.hpp"
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
|
||||
using namespace mwmp;
|
||||
|
||||
PacketGameSettings::PacketGameSettings(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
|
||||
{
|
||||
packetID = ID_GAME_SETTINGS;
|
||||
orderChannel = CHANNEL_SYSTEM;
|
||||
}
|
||||
|
||||
void PacketGameSettings::Packet(RakNet::BitStream *bs, bool send)
|
||||
{
|
||||
PlayerPacket::Packet(bs, send);
|
||||
|
||||
RW(player->consoleAllowed, send);
|
||||
RW(player->difficulty, send);
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
#ifndef OPENMW_PACKETGAMESETTINGS_HPP
|
||||
#define OPENMW_PACKETGAMESETTINGS_HPP
|
||||
|
||||
#include <components/openmw-mp/Packets/Player/PlayerPacket.hpp>
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class PacketGameSettings: public PlayerPacket
|
||||
{
|
||||
public:
|
||||
PacketGameSettings(RakNet::RakPeerInterface *peer);
|
||||
|
||||
virtual void Packet(RakNet::BitStream *bs, bool send);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PACKETGAMESETTINGS_HPP
|
Loading…
Reference in New Issue