Cleanup 5
This commit is contained in:
@@ -282,8 +282,7 @@ namespace FlaxEditor.Tools.Foliage
|
||||
};
|
||||
|
||||
// Try restore painting with the given model ID
|
||||
bool itemChecked;
|
||||
if (!Tab.FoliageTypeModelIdsToPaint.TryGetValue(model.ID, out itemChecked))
|
||||
if (!Tab.FoliageTypeModelIdsToPaint.TryGetValue(model.ID, out bool itemChecked))
|
||||
{
|
||||
// Enable by default
|
||||
itemChecked = true;
|
||||
|
||||
@@ -310,10 +310,9 @@ namespace FlaxEditor.Tools.Terrain
|
||||
throw new InvalidOperationException("Cannot set cursor then no terrain is selected.");
|
||||
var brushBounds = CursorBrushBounds;
|
||||
var patchesCount = terrain.PatchesCount;
|
||||
BoundingBox tmp;
|
||||
for (int patchIndex = 0; patchIndex < patchesCount; patchIndex++)
|
||||
{
|
||||
terrain.GetPatchBounds(patchIndex, out tmp);
|
||||
terrain.GetPatchBounds(patchIndex, out BoundingBox tmp);
|
||||
if (!tmp.Intersects(ref brushBounds))
|
||||
continue;
|
||||
|
||||
|
||||
@@ -329,10 +329,9 @@ namespace FlaxEditor.Tools.Terrain
|
||||
throw new InvalidOperationException("Cannot set cursor then no terrain is selected.");
|
||||
var brushBounds = CursorBrushBounds;
|
||||
var patchesCount = terrain.PatchesCount;
|
||||
BoundingBox tmp;
|
||||
for (int patchIndex = 0; patchIndex < patchesCount; patchIndex++)
|
||||
{
|
||||
terrain.GetPatchBounds(patchIndex, out tmp);
|
||||
terrain.GetPatchBounds(patchIndex, out BoundingBox tmp);
|
||||
if (!tmp.Intersects(ref brushBounds))
|
||||
continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user