mirror of
https://github.com/Relintai/godot_voxel.git
synced 2025-01-23 17:27:20 +01:00
Fix missing destructor in VoxelBlock... woopsie
This commit is contained in:
parent
d21974e122
commit
035e45d0a3
@ -12,14 +12,14 @@ VoxelBlock *VoxelBlock::create(Vector3i bpos, Ref<VoxelBuffer> buffer, unsigned
|
||||
block->_position_in_voxels = bpos * (size << p_lod_index);
|
||||
|
||||
block->voxels = buffer;
|
||||
//block->map = ↦
|
||||
return block;
|
||||
}
|
||||
|
||||
VoxelBlock::VoxelBlock() :
|
||||
voxels(NULL),
|
||||
_mesh_update_count(0) {
|
||||
voxels(NULL) {
|
||||
}
|
||||
|
||||
VoxelBlock::~VoxelBlock() {
|
||||
VisualServer &vs = *VisualServer::get_singleton();
|
||||
|
||||
if (_mesh_instance.is_valid()) {
|
||||
|
@ -19,6 +19,8 @@ public:
|
||||
|
||||
static VoxelBlock *create(Vector3i bpos, Ref<VoxelBuffer> buffer, unsigned int size, unsigned int p_lod_index);
|
||||
|
||||
~VoxelBlock();
|
||||
|
||||
void set_mesh(Ref<Mesh> mesh, Ref<World> world);
|
||||
bool has_mesh() const;
|
||||
|
||||
@ -34,7 +36,7 @@ private:
|
||||
|
||||
Ref<Mesh> _mesh;
|
||||
RID _mesh_instance;
|
||||
int _mesh_update_count;
|
||||
int _mesh_update_count = 0;
|
||||
bool _visible = true;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user