summaryrefslogtreecommitdiffstats
path: root/game/client/session.cc
diff options
context:
space:
mode:
authoruntodesu <kirill@untode.su>2025-09-12 14:09:34 +0500
committeruntodesu <kirill@untode.su>2025-09-12 14:09:34 +0500
commit73cbcdd6e8c849e32abbf9757e603e6a6654e870 (patch)
tree136e1aef82a25c31552b8990952a7607cfd4708e /game/client/session.cc
parente9076f22fe2a49d1cd8933e54b7b00c5dd943269 (diff)
downloadvoxelius-73cbcdd6e8c849e32abbf9757e603e6a6654e870.tar.bz2
voxelius-73cbcdd6e8c849e32abbf9757e603e6a6654e870.zip
Metaitems
Diffstat (limited to 'game/client/session.cc')
-rw-r--r--game/client/session.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/game/client/session.cc b/game/client/session.cc
index c33b4d9..907b789 100644
--- a/game/client/session.cc
+++ b/game/client/session.cc
@@ -127,7 +127,7 @@ static void on_voxel_set(const world::VoxelSetEvent& event)
// FIXME: should we also validate things here or wait for the server to do so
protocol::SetVoxel packet;
packet.vpos = coord::to_voxel(event.cpos, event.lpos);
- packet.voxel = event.voxel->get_id();
+ packet.voxel = event.voxel ? event.voxel->get_id() : NULL_VOXEL_ID;
protocol::send(session::peer, protocol::encode(packet));
}
@@ -286,7 +286,7 @@ void session::send_login_request(void)
protocol::LoginRequest packet;
packet.version = protocol::VERSION;
packet.voxel_registry_checksum = world::voxel_registry::get_checksum();
- packet.item_registry_checksum = world::item_registry::calculate_checksum();
+ packet.item_registry_checksum = world::item_registry::get_checksum();
packet.password_hash = server_password_hash;
packet.username = client_game::username.get();