mirror of
https://github.com/Relintai/godot_voxel.git
synced 2025-05-01 17:57:55 +02:00
Fixed VoxelTerrain not working if no script is attached
This commit is contained in:
parent
c38a822664
commit
7f12904d60
@ -89,12 +89,6 @@ void VoxelTerrain::update_blocks() {
|
|||||||
|
|
||||||
if (!_map->has_block(block_pos)) {
|
if (!_map->has_block(block_pos)) {
|
||||||
|
|
||||||
// Get script
|
|
||||||
ScriptInstance * script = get_script_instance();
|
|
||||||
if (script == NULL) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create buffer
|
// Create buffer
|
||||||
Ref<VoxelBuffer> buffer_ref = Ref<VoxelBuffer>(memnew(VoxelBuffer));
|
Ref<VoxelBuffer> buffer_ref = Ref<VoxelBuffer>(memnew(VoxelBuffer));
|
||||||
const Vector3i block_size(VoxelBlock::SIZE, VoxelBlock::SIZE, VoxelBlock::SIZE);
|
const Vector3i block_size(VoxelBlock::SIZE, VoxelBlock::SIZE, VoxelBlock::SIZE);
|
||||||
|
Loading…
Reference in New Issue
Block a user