summaryrefslogtreecommitdiffstats
path: root/game/server/receive.cc
diff options
context:
space:
mode:
authoruntodesu <kirill@untode.su>2025-09-12 13:33:52 +0500
committeruntodesu <kirill@untode.su>2025-09-12 13:33:52 +0500
commite9076f22fe2a49d1cd8933e54b7b00c5dd943269 (patch)
tree89b8a4ca1861196e067dcba218fad1d7f889b860 /game/server/receive.cc
parent68694a9c9d7d27d3b79c7b96bb67f56db2f75c45 (diff)
downloadvoxelius-e9076f22fe2a49d1cd8933e54b7b00c5dd943269.tar.bz2
voxelius-e9076f22fe2a49d1cd8933e54b7b00c5dd943269.zip
It compiles
Diffstat (limited to 'game/server/receive.cc')
-rw-r--r--game/server/receive.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/game/server/receive.cc b/game/server/receive.cc
index 75ac3a6..612674e 100644
--- a/game/server/receive.cc
+++ b/game/server/receive.cc
@@ -10,6 +10,7 @@
#include "shared/world/chunk_aabb.hh"
#include "shared/world/dimension.hh"
+#include "shared/world/voxel_registry.hh"
#include "shared/coord.hh"
#include "shared/protocol.hh"
@@ -83,7 +84,7 @@ static void on_entity_head_packet(const protocol::EntityHead& packet)
static void on_set_voxel_packet(const protocol::SetVoxel& packet)
{
if(auto session = sessions::find(packet.peer)) {
- if(session->dimension && !session->dimension->set_voxel(packet.voxel, packet.vpos)) {
+ if(session->dimension && !session->dimension->set_voxel(world::voxel_registry::find(packet.voxel), packet.vpos)) {
auto cpos = coord::to_chunk(packet.vpos);
auto lpos = coord::to_local(packet.vpos);
auto index = coord::to_index(lpos);
@@ -102,7 +103,7 @@ static void on_set_voxel_packet(const protocol::SetVoxel& packet)
return;
}
- chunk->set_voxel(packet.voxel, index);
+ chunk->set_voxel(world::voxel_registry::find(packet.voxel), index);
session->dimension->chunks.emplace_or_replace<world::Inhabited>(chunk->get_entity());