Fix build errors due to Godot macro change

master
Cory Petkovsek 2019-11-13 13:20:05 +08:00
parent d70dfca8ea
commit 4820998c56
1 changed files with 10 additions and 14 deletions

View File

@ -18,15 +18,13 @@ void VoxelStream::emerge_block(Ref<VoxelBuffer> out_buffer, Vector3i origin_in_v
const Variant *args[3] = { &arg1, &arg2, &arg3 }; const Variant *args[3] = { &arg1, &arg2, &arg3 };
Variant::CallError err; Variant::CallError err;
script->call("emerge_block", args, 3, err); script->call("emerge_block", args, 3, err);
if (err.error != Variant::CallError::CALL_OK) { ERR_FAIL_COND_MSG(err.error != Variant::CallError::CALL_OK,
ERR_EXPLAIN("voxel_stream.cpp:emerge_block gave an error: " + String::num(err.error) + "voxel_stream.cpp:emerge_block gave an error: " + String::num(err.error) +
", Argument: " + String::num(err.argument) + ", Argument: " + String::num(err.argument) +
", Expected type: " + Variant::get_type_name(err.expected)); ", Expected type: " + Variant::get_type_name(err.expected));
ERR_FAIL();
// This had to be explicitely logged due to the usual GD debugger not working with threads // This had to be explicitely logged due to the usual GD debugger not working with threads
} }
} }
}
void VoxelStream::immerge_block(Ref<VoxelBuffer> buffer, Vector3i origin_in_voxels, int lod) { void VoxelStream::immerge_block(Ref<VoxelBuffer> buffer, Vector3i origin_in_voxels, int lod) {
ERR_FAIL_COND(buffer.is_null()); ERR_FAIL_COND(buffer.is_null());
@ -39,15 +37,13 @@ void VoxelStream::immerge_block(Ref<VoxelBuffer> buffer, Vector3i origin_in_voxe
const Variant *args[3] = { &arg1, &arg2, &arg3 }; const Variant *args[3] = { &arg1, &arg2, &arg3 };
Variant::CallError err; Variant::CallError err;
script->call("immerge_block", args, 3, err); script->call("immerge_block", args, 3, err);
if (err.error != Variant::CallError::CALL_OK) { ERR_FAIL_COND_MSG(err.error != Variant::CallError::CALL_OK,
ERR_EXPLAIN("voxel_stream.cpp:immerge_block gave an error: " + String::num(err.error) + "voxel_stream.cpp:immerge_block gave an error: " + String::num(err.error) +
" Argument: " + String::num(err.argument) + " Argument: " + String::num(err.argument) +
" Expected type: " + Variant::get_type_name(err.expected)); " Expected type: " + Variant::get_type_name(err.expected));
ERR_FAIL();
// This had to be explicitely logged due to the usual GD debugger not working with threads // This had to be explicitely logged due to the usual GD debugger not working with threads
} }
} }
}
void VoxelStream::emerge_blocks(Vector<VoxelStream::BlockRequest> &p_blocks) { void VoxelStream::emerge_blocks(Vector<VoxelStream::BlockRequest> &p_blocks) {
// Default implementation. May matter for some stream types to optimize loading. // Default implementation. May matter for some stream types to optimize loading.