WithTextDecoration Fix

This commit is contained in:
Marwan
2017-11-19 17:12:18 -05:00
committed by reaperrr
parent 43d100246f
commit 8a38c6ef23
2 changed files with 4 additions and 4 deletions

View File

@@ -56,7 +56,7 @@ namespace OpenRA.Mods.Common.Traits.Render
}
}
public class WithTextDecoration : ConditionalTrait<WithTextDecorationInfo>, IRender, IRenderAboveShroudWhenSelected, INotifyCapture
public class WithTextDecoration : ConditionalTrait<WithTextDecorationInfo>, IRender, IRenderAboveShroudWhenSelected, INotifyOwnerChanged
{
readonly SpriteFont font;
Color color;
@@ -126,7 +126,7 @@ namespace OpenRA.Mods.Common.Traits.Render
return new IRenderable[] { new TextRenderable(font, wr.ProjectedPosition(screenPos), Info.ZOffset, color, Info.Text) };
}
void INotifyCapture.OnCapture(Actor self, Actor captor, Player oldOwner, Player newOwner)
void INotifyOwnerChanged.OnOwnerChanged(Actor self, Player oldOwner, Player newOwner)
{
if (Info.UsePlayerColor)
color = newOwner.Color.RGB;