Skip to content

Commit

Permalink
Fix Mobile actors turning even if Mobile is paused
Browse files Browse the repository at this point in the history
  • Loading branch information
reaperrr committed Apr 13, 2019
1 parent 840eb70 commit d951cd2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions OpenRA.Mods.Common/Activities/Turn.cs
Expand Up @@ -17,13 +17,13 @@ namespace OpenRA.Mods.Common.Activities
{
public class Turn : Activity
{
readonly IDisabledTrait disablable;
readonly Mobile mobile;
readonly IFacing facing;
readonly int desiredFacing;

public Turn(Actor self, int desiredFacing)
{
disablable = self.TraitOrDefault<IMove>() as IDisabledTrait;
mobile = self.TraitOrDefault<Mobile>();
facing = self.Trait<IFacing>();
this.desiredFacing = desiredFacing;
}
Expand All @@ -33,7 +33,7 @@ public override Activity Tick(Actor self)
if (IsCanceling)
return NextActivity;

if (disablable != null && disablable.IsTraitDisabled)
if (mobile != null && (mobile.IsTraitDisabled || mobile.IsTraitPaused))
return this;

if (desiredFacing == facing.Facing)
Expand Down

0 comments on commit d951cd2

Please sign in to comment.