Use new IAutoRenderSize for determining actor render bounds
This commit is contained in:
@@ -1234,6 +1234,25 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
}
|
||||
}
|
||||
|
||||
// Split Selection- and RenderSize
|
||||
if (engineVersion < 20171115)
|
||||
{
|
||||
var autoSelSize = node.Value.Nodes.FirstOrDefault(n => n.Key.StartsWith("AutoSelectionSize", StringComparison.Ordinal));
|
||||
if (autoSelSize != null)
|
||||
node.Value.Nodes.Add(new MiniYamlNode("AutoRenderSize", ""));
|
||||
|
||||
var customSelSize = node.Value.Nodes.FirstOrDefault(n => n.Key.StartsWith("CustomSelectionSize", StringComparison.Ordinal));
|
||||
if (customSelSize != null)
|
||||
{
|
||||
var bounds = customSelSize.Value.Nodes.FirstOrDefault(n => n.Key == "CustomBounds");
|
||||
var customRenderSize = new MiniYamlNode("CustomRenderSize", "");
|
||||
if (bounds != null)
|
||||
customRenderSize.Value.Nodes.Add(bounds);
|
||||
|
||||
node.Value.Nodes.Add(customRenderSize);
|
||||
}
|
||||
}
|
||||
|
||||
UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user