Fix unused variables
This commit is contained in:
parent
57357df658
commit
c9aa295b03
@ -21,7 +21,7 @@ LoadBlockDataTask::LoadBlockDataTask(uint32_t p_volume_id, Vector3i p_block_pos,
|
||||
_lod(p_lod),
|
||||
_block_size(p_block_size),
|
||||
_request_instances(p_request_instances),
|
||||
_request_voxels(true),
|
||||
//_request_voxels(true),
|
||||
_stream_dependency(p_stream_dependency) {
|
||||
//
|
||||
++g_debug_load_block_tasks_count;
|
||||
|
@ -33,7 +33,7 @@ private:
|
||||
bool _has_run = false;
|
||||
bool _too_far = false;
|
||||
bool _request_instances = false;
|
||||
bool _request_voxels = false;
|
||||
//bool _request_voxels = false;
|
||||
bool _max_lod_hint = false;
|
||||
bool _fallback_on_generator = false;
|
||||
std::shared_ptr<StreamingDependency> _stream_dependency;
|
||||
|
@ -621,7 +621,7 @@ struct ScheduleSaveAction {
|
||||
void VoxelTerrain::unload_data_block(Vector3i bpos) {
|
||||
const bool save = _stream.is_valid() && (!Engine::get_singleton()->is_editor_hint() || _run_stream_in_editor);
|
||||
|
||||
_data_map.remove_block(bpos, [this, bpos, save](VoxelDataBlock &block) {
|
||||
_data_map.remove_block(bpos, [this, save](VoxelDataBlock &block) {
|
||||
emit_data_block_unloaded(block);
|
||||
if (save) {
|
||||
// Note: no need to copy the block because it gets removed from the map anyways
|
||||
@ -1090,8 +1090,8 @@ void VoxelTerrain::process_viewers() {
|
||||
VoxelServer::get_singleton()->is_viewer_requiring_data_block_notifications(viewer.id);
|
||||
|
||||
// Unview blocks that just fell out of range
|
||||
prev_data_box.difference(new_data_box, [this, &viewer](Box3i out_of_range_box) {
|
||||
out_of_range_box.for_each_cell([this, &viewer](Vector3i bpos) { //
|
||||
prev_data_box.difference(new_data_box, [this](Box3i out_of_range_box) {
|
||||
out_of_range_box.for_each_cell([this](Vector3i bpos) { //
|
||||
unview_data_block(bpos);
|
||||
});
|
||||
});
|
||||
|
@ -1669,10 +1669,10 @@ Dictionary VoxelLodTerrain::_b_get_statistics() const {
|
||||
|
||||
const unsigned int lod_count = _update_data->settings.lod_count;
|
||||
|
||||
int deferred_collision_updates = 0;
|
||||
for (unsigned int lod_index = 0; lod_index < lod_count; ++lod_index) {
|
||||
deferred_collision_updates += _deferred_collision_updates_per_lod[lod_index].size();
|
||||
}
|
||||
// int deferred_collision_updates = 0;
|
||||
// for (unsigned int lod_index = 0; lod_index < lod_count; ++lod_index) {
|
||||
// deferred_collision_updates += _deferred_collision_updates_per_lod[lod_index].size();
|
||||
// }
|
||||
|
||||
// Breakdown of information and time spent in _process and the update task.
|
||||
|
||||
|
@ -250,10 +250,8 @@ static void process_unload_data_blocks_sliding_box(VoxelLodTerrainUpdateData::St
|
||||
VOXEL_PROFILE_SCOPE_NAMED("Unload data");
|
||||
VoxelDataLodMap::Lod &data_lod = data.lods[lod_index];
|
||||
RWLockWrite wlock(data_lod.map_lock);
|
||||
prev_box.difference(
|
||||
new_box, [&lod, &data_lod, lod_index, &blocks_to_save, can_save](Box3i out_of_range_box) {
|
||||
out_of_range_box.for_each_cell(
|
||||
[&lod, &data_lod, lod_index, &blocks_to_save, can_save](Vector3i pos) {
|
||||
prev_box.difference(new_box, [&lod, &data_lod, &blocks_to_save, can_save](Box3i out_of_range_box) {
|
||||
out_of_range_box.for_each_cell([&lod, &data_lod, &blocks_to_save, can_save](Vector3i pos) {
|
||||
//print_line(String("Immerge {0}").format(varray(pos.to_vec3())));
|
||||
unload_data_block_no_lock(lod, data_lod, pos, blocks_to_save, can_save);
|
||||
});
|
||||
@ -345,7 +343,7 @@ static void process_unload_mesh_blocks_sliding_box(VoxelLodTerrainUpdateData::St
|
||||
{
|
||||
VOXEL_PROFILE_SCOPE_NAMED("Cancel updates");
|
||||
// Cancel block updates that are not within the new region
|
||||
unordered_remove_if(lod.blocks_pending_update, [&lod, new_box](Vector3i bpos) { //
|
||||
unordered_remove_if(lod.blocks_pending_update, [new_box](Vector3i bpos) { //
|
||||
return !new_box.contains(bpos);
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user