summaryrefslogtreecommitdiffstats
path: root/game/client/session.cc
diff options
context:
space:
mode:
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();