diff options
| author | untodesu <kirill@untode.su> | 2025-09-12 16:15:32 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-09-12 16:15:32 +0500 |
| commit | 522a7514012da86f7b9643179f0763746f3b232e (patch) | |
| tree | 7c4ea8f03b6778572d59784dc28b600e3f8f2268 /game/client/gui/bother.cc | |
| parent | f210a86c1406ccc6dfd6f14181dd7a1274ee0de4 (diff) | |
| download | voxelius-522a7514012da86f7b9643179f0763746f3b232e.tar.bz2 voxelius-522a7514012da86f7b9643179f0763746f3b232e.zip | |
Protocol and versioning changes
Diffstat (limited to 'game/client/gui/bother.cc')
| -rw-r--r-- | game/client/gui/bother.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/game/client/gui/bother.cc b/game/client/gui/bother.cc index 1bb7097..e87b9ff 100644 --- a/game/client/gui/bother.cc +++ b/game/client/gui/bother.cc @@ -2,6 +2,8 @@ #include "client/gui/bother.hh"
+#include "core/version.hh"
+
#include "shared/protocol.hh"
#include "client/globals.hh"
@@ -29,10 +31,12 @@ static void on_status_response_packet(const protocol::StatusResponse& packet) gui::BotherResponseEvent event;
event.identity = identity;
event.is_server_unreachable = false;
- event.protocol_version = packet.version;
event.num_players = packet.num_players;
event.max_players = packet.max_players;
event.motd = packet.motd;
+ event.game_version_major = packet.game_version_major;
+ event.game_version_minor = packet.game_version_minor;
+ event.game_version_patch = packet.game_version_patch;
globals::dispatcher.trigger(event);
enet_peer_disconnect(packet.peer, protocol::CHANNEL);
@@ -89,7 +93,7 @@ void gui::bother::update_late(void) if(0 < enet_host_service(bother_host, &enet_event, 0)) {
if(enet_event.type == ENET_EVENT_TYPE_CONNECT) {
protocol::StatusRequest packet;
- packet.version = protocol::VERSION;
+ packet.game_version_major = version::major;
protocol::send(enet_event.peer, protocol::encode(packet));
return;
}
|
