Fix for turret following invisible unit
Fixed turret tracking invisible units after being attacked Fix for turret following invisible unit Fix for turrent following invisible unit
This commit is contained in:
committed by
Matthias Mailänder
parent
57143087d7
commit
5242716887
@@ -123,7 +123,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (mobile != null && !mobile.CanInteractWithGroundLayer(self))
|
||||
return;
|
||||
|
||||
if (RequestedTarget.Type != TargetType.Invalid)
|
||||
if (RequestedTarget.IsValidFor(self))
|
||||
{
|
||||
IsAiming = CanAimAtTarget(self, RequestedTarget, requestedForceAttack);
|
||||
if (IsAiming)
|
||||
@@ -133,7 +133,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
IsAiming = false;
|
||||
|
||||
if (OpportunityTarget.Type != TargetType.Invalid)
|
||||
if (OpportunityTarget.IsValidFor(self))
|
||||
IsAiming = CanAimAtTarget(self, OpportunityTarget, opportunityForceAttack);
|
||||
|
||||
if (!IsAiming && Info.OpportunityFire && autoTarget != null &&
|
||||
@@ -143,7 +143,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
opportunityForceAttack = false;
|
||||
opportunityTargetIsPersistentTarget = false;
|
||||
|
||||
if (OpportunityTarget.Type != TargetType.Invalid)
|
||||
if (OpportunityTarget.IsValidFor(self))
|
||||
IsAiming = CanAimAtTarget(self, OpportunityTarget, opportunityForceAttack);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user