Merge remote-tracking branch 'origin/master' into linux-editor
# Conflicts: # Source/Engine/Core/Math/Color.cs # Source/Engine/Navigation/Navigation.cpp # Source/Engine/Platform/Win32/Win32Platform.cpp
This commit is contained in:
@@ -56,8 +56,10 @@ namespace FlaxEditor.Tools.Foliage
|
||||
|
||||
if (!_staticModel)
|
||||
{
|
||||
_staticModel = new StaticModel();
|
||||
_staticModel.StaticFlags = StaticFlags.None;
|
||||
_staticModel = new StaticModel
|
||||
{
|
||||
StaticFlags = StaticFlags.None
|
||||
};
|
||||
}
|
||||
|
||||
_staticModel.Model = model;
|
||||
|
||||
@@ -179,9 +179,11 @@ namespace FlaxEditor.Tools.Foliage
|
||||
private void OnCreateNewFoliageClicked()
|
||||
{
|
||||
// Create
|
||||
var actor = new FlaxEngine.Foliage();
|
||||
actor.StaticFlags = StaticFlags.FullyStatic;
|
||||
actor.Name = "Foliage";
|
||||
var actor = new FlaxEngine.Foliage
|
||||
{
|
||||
StaticFlags = StaticFlags.FullyStatic,
|
||||
Name = "Foliage"
|
||||
};
|
||||
|
||||
// Spawn and select
|
||||
Editor.SceneEditing.Spawn(actor);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -179,8 +179,10 @@ namespace FlaxEditor.Tools.Terrain
|
||||
|
||||
// Start async work
|
||||
_terrain = terrain;
|
||||
var thread = new System.Threading.Thread(Generate);
|
||||
thread.Name = "Terrain Generator";
|
||||
var thread = new System.Threading.Thread(Generate)
|
||||
{
|
||||
Name = "Terrain Generator"
|
||||
};
|
||||
thread.Start();
|
||||
}
|
||||
|
||||
|
||||
@@ -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