Skip to content

Commit

Permalink
swap return to continue inside a loop..
Browse files Browse the repository at this point in the history
  • Loading branch information
Xtarsia committed Oct 15, 2024
1 parent de988c5 commit 8a2a904
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/terrain_3d_instancer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ void Terrain3DInstancer::remove_instances(const Vector3 &p_global_position, cons
}
Array cell_queue = c_locs.keys();
if (cell_queue.size() == 0) {
return;
continue;
}
Ref<Terrain3DMeshAsset> mesh_asset = _terrain->get_assets()->get_mesh_asset(m);
real_t density = CLAMP(.1f * brush_size * strength * mesh_asset->get_density() /
Expand Down Expand Up @@ -831,7 +831,7 @@ void Terrain3DInstancer::update_transforms(const AABB &p_aabb) {
}
Array cell_queue = c_locs.keys();
if (cell_queue.size() == 0) {
return;
continue;
}
Ref<Terrain3DMeshAsset> mesh_asset = _terrain->get_assets()->get_mesh_asset(m);
for (int c = 0; c < cell_queue.size(); c++) {
Expand Down Expand Up @@ -953,7 +953,7 @@ void Terrain3DInstancer::swap_ids(const int p_src_id, const int p_dst_id) {
Ref<Terrain3DRegion> region = _terrain->get_data()->get_region(region_loc);
if (region.is_null()) {
LOG(WARN, "No region found at: ", region_loc);
return;
continue;
}
Dictionary mesh_dict = region->get_multimeshes(); // TODO BROKEN
// mesh_dict could have src, src&dst, dst or nothing. All 4 must be considered
Expand Down

0 comments on commit 8a2a904

Please sign in to comment.