optimize terrain sculpting objects snap
This commit is contained in:
@@ -1350,6 +1350,9 @@ void World::changeObjectsWithTerrain(glm::vec3 const& pos, float change, float r
|
||||
// applies the terrain brush to the terrain objects hit
|
||||
ZoneScoped;
|
||||
|
||||
if (!iter_wmos_ && !iter_m2s)
|
||||
return;
|
||||
|
||||
// Identical code to chunk->changeTerrain()
|
||||
// if (_snap_m2_objects_chkbox->isChecked() || _snap_wmo_objects_chkbox->isChecked()) {
|
||||
auto objects_hit = getObjectsInRange(pos, radius, true, iter_wmos_, iter_m2s);
|
||||
@@ -1513,6 +1516,9 @@ std::vector<std::pair<SceneObject*, float>> World::getObjectsGroundDistance(glm:
|
||||
{
|
||||
std::vector<std::pair<SceneObject*, float>> objects_ground_distance;
|
||||
|
||||
if (!iter_wmos_ && !iter_m2s)
|
||||
return objects_ground_distance;
|
||||
|
||||
auto objects_hit = getObjectsInRange(pos, radius, true
|
||||
, iter_wmos_, iter_m2s);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user