games/digger: Use voxelworld's voxel/atlas_reg for custom node
This commit is contained in:
parent
fea7208fa0
commit
17b09fabdb
@ -302,6 +302,14 @@ function M.set_camera(new_camera_node)
|
||||
camera_node = new_camera_node
|
||||
end
|
||||
|
||||
function M.get_voxel_registry()
|
||||
return voxel_reg
|
||||
end
|
||||
|
||||
function M.get_atlas_registry()
|
||||
return atlas_reg
|
||||
end
|
||||
|
||||
function send_get_section(p)
|
||||
local data = cereal.binary_output({
|
||||
p = {
|
||||
|
@ -217,11 +217,10 @@ magic.SubscribeToEvent("PhysicsCollision", function(event_type, event_data)
|
||||
end
|
||||
end)
|
||||
|
||||
-- TODO: Fill in some stuff to the voxel registry
|
||||
local voxel_reg = buildat.createVoxelRegistry()
|
||||
local atlas_reg = buildat.createAtlasRegistry()
|
||||
|
||||
function setup_simple_voxel_data(node)
|
||||
local voxel_reg = voxelworld.get_voxel_registry()
|
||||
local atlas_reg = voxelworld.get_atlas_registry()
|
||||
|
||||
local data = node:GetVar("simple_voxel_data"):GetBuffer()
|
||||
local w = node:GetVar("simple_voxel_w"):GetInt()
|
||||
local h = node:GetVar("simple_voxel_h"):GetInt()
|
||||
|
Loading…
x
Reference in New Issue
Block a user