Rename Stance to PlayerRelationship
This commit is contained in:
@@ -403,10 +403,10 @@ namespace OpenRA.Mods.Common.Traits
|
||||
&& (target.IsInRange(self.CenterPosition, GetMaximumRangeVersusTarget(target)) || (allowMove && self.Info.HasTraitInfo<IMoveInfo>()));
|
||||
}
|
||||
|
||||
public Stance UnforcedAttackTargetStances()
|
||||
public PlayerRelationship UnforcedAttackTargetStances()
|
||||
{
|
||||
// PERF: Avoid LINQ.
|
||||
var stances = Stance.None;
|
||||
var stances = PlayerRelationship.None;
|
||||
foreach (var armament in Armaments)
|
||||
if (!armament.IsTraitDisabled)
|
||||
stances |= armament.Info.TargetStances;
|
||||
@@ -444,7 +444,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
// targeting and attacking logic (which should be logically separate)
|
||||
// to use the same code
|
||||
if (target.Type == TargetType.Actor && target.Actor.EffectiveOwner != null &&
|
||||
target.Actor.EffectiveOwner.Disguised && self.Owner.Stances[target.Actor.Owner] == Stance.Enemy)
|
||||
target.Actor.EffectiveOwner.Disguised && self.Owner.Stances[target.Actor.Owner] == PlayerRelationship.Enemy)
|
||||
modifiers |= TargetModifiers.ForceAttack;
|
||||
|
||||
var forceAttack = modifiers.HasModifier(TargetModifiers.ForceAttack);
|
||||
|
||||
Reference in New Issue
Block a user