summaryrefslogtreecommitdiffstats
path: root/game/client
diff options
context:
space:
mode:
Diffstat (limited to 'game/client')
-rw-r--r--game/client/receive.cc12
-rw-r--r--game/client/session.cc4
2 files changed, 15 insertions, 1 deletions
diff --git a/game/client/receive.cc b/game/client/receive.cc
index 5b053d0..ab1cd62 100644
--- a/game/client/receive.cc
+++ b/game/client/receive.cc
@@ -12,6 +12,7 @@
#include "client/factory.hh"
#include "client/globals.hh"
#include "client/gui_screen.hh"
+#include "client/message_box.hh"
#include "client/session.hh"
#include "client/sound.hh"
#include "client/window_title.hh"
@@ -33,6 +34,17 @@ static bool synchronize_entity_id(Dimension *dimension, entt::entity entity)
session::disconnect("protocol.entity_id_desync");
spdlog::critical("receive: entity desync: network {} resolved as client {}",
static_cast<std::uint64_t>(entity), static_cast<std::uint64_t>(created));
+
+ message_box::reset();
+ message_box::set_title("disconnected.disconnected");
+ message_box::set_subtitle("protocol.entity_id_desync");
+ message_box::add_button("disconnected.back", [](void) {
+ globals::gui_screen = GUI_PLAY_MENU;
+ window_title::update();
+ });
+
+ globals::gui_screen = GUI_MESSAGE_BOX;
+
return false;
}
diff --git a/game/client/session.cc b/game/client/session.cc
index 4c4d06b..b5ed12a 100644
--- a/game/client/session.cc
+++ b/game/client/session.cc
@@ -7,6 +7,7 @@
#include "shared/coord.hh"
#include "shared/dimension.hh"
#include "shared/head.hh"
+#include "shared/item_registry.hh"
#include "shared/player.hh"
#include "shared/protocol.hh"
#include "shared/transform.hh"
@@ -275,7 +276,8 @@ void session::send_login_request(void)
{
protocol::LoginRequest packet;
packet.version = protocol::VERSION;
- packet.voxel_def_checksum = voxel_registry::checksum();
+ packet.voxel_registry_checksum = voxel_registry::calcualte_checksum();
+ packet.item_registry_checksum = item_registry::calcualte_checksum();
packet.password_hash = server_password_hash;
packet.username = client_game::username.get();