Include selection decorations when calculating ScreenMap bounds.
This commit is contained in:
@@ -23,7 +23,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
public override object Create(ActorInitializer init) { return new SelectionDecorations(init.Self, this); }
|
||||
}
|
||||
|
||||
public class SelectionDecorations : SelectionDecorationsBase
|
||||
public class SelectionDecorations : SelectionDecorationsBase, IRender
|
||||
{
|
||||
readonly Interactable interactable;
|
||||
|
||||
@@ -62,5 +62,15 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
var bounds = interactable.DecorationBounds(self, wr);
|
||||
yield return new SelectionBarsAnnotationRenderable(self, bounds, displayHealth, displayExtra);
|
||||
}
|
||||
|
||||
IEnumerable<IRenderable> IRender.Render(Actor self, WorldRenderer wr)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
|
||||
IEnumerable<Rectangle> IRender.ScreenBounds(Actor self, WorldRenderer wr)
|
||||
{
|
||||
yield return interactable.DecorationBounds(self, wr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user