Don't report "Primary Building Selected" when nothing changes.

This commit is contained in:
Paul Chote
2021-07-07 23:41:14 +01:00
committed by abcdefg30
parent 99322cee8f
commit b08117dc93

View File

@@ -79,9 +79,11 @@ namespace OpenRA.Mods.Common.Traits
void IResolveOrder.ResolveOrder(Actor self, Order order)
{
var forceRallyPoint = RallyPoint.IsForceSet(order);
if (order.OrderString == OrderID || forceRallyPoint)
SetPrimaryProducer(self, !IsPrimary || forceRallyPoint);
if (order.OrderString == OrderID)
SetPrimaryProducer(self, !IsPrimary);
if (RallyPoint.IsForceSet(order) && !IsPrimary)
SetPrimaryProducer(self, true);
}
public void SetPrimaryProducer(Actor self, bool isPrimary)