mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2026-01-13 09:01:29 +01:00
first changes
This commit is contained in:
@@ -50,8 +50,9 @@ class ProtocolGame final : public Protocol
|
||||
{
|
||||
public:
|
||||
// static protocol information
|
||||
enum {server_sends_first = false};
|
||||
enum {protocol_identifier = 0x0A}; // Not required as we send first
|
||||
enum { server_sends_first = true };
|
||||
enum { protocol_identifier = 0 }; // Not required as we send first
|
||||
enum { use_checksum = true };
|
||||
|
||||
static const char* protocol_name() {
|
||||
return "gameworld protocol";
|
||||
@@ -71,7 +72,6 @@ class ProtocolGame final : public Protocol
|
||||
return std::static_pointer_cast<ProtocolGame>(shared_from_this());
|
||||
}
|
||||
void connect(uint32_t playerId, OperatingSystem_t operatingSystem);
|
||||
void sendUpdateRequest();
|
||||
void disconnectClient(const std::string& message) const;
|
||||
void writeToOutputBuffer(const NetworkMessage& msg);
|
||||
|
||||
@@ -86,6 +86,7 @@ class ProtocolGame final : public Protocol
|
||||
// we have all the parse methods
|
||||
void parsePacket(NetworkMessage& msg) final;
|
||||
void onRecvFirstMessage(NetworkMessage& msg) final;
|
||||
void onConnect() override;
|
||||
|
||||
//Parse methods
|
||||
void parseAutoWalk(NetworkMessage& msg);
|
||||
@@ -262,8 +263,11 @@ class ProtocolGame final : public Protocol
|
||||
Player* player = nullptr;
|
||||
|
||||
uint32_t eventConnect = 0;
|
||||
uint32_t challengeTimestamp = 0;
|
||||
uint16_t version = CLIENT_VERSION_MIN;
|
||||
|
||||
uint8_t challengeRandom = 0;
|
||||
|
||||
bool debugAssertSent = false;
|
||||
bool acceptPackets = false;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user