diff options
Diffstat (limited to 'scripts/actors/actions/MovementAction.cs')
| -rw-r--r-- | scripts/actors/actions/MovementAction.cs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/actors/actions/MovementAction.cs b/scripts/actors/actions/MovementAction.cs index f86d542..b37f9ae 100644 --- a/scripts/actors/actions/MovementAction.cs +++ b/scripts/actors/actions/MovementAction.cs @@ -11,14 +11,12 @@ public partial class MovementAction : DirectionalAction public override void Perform() { - Vector2I finalDestination = actor.GridPosition + Offset; - // Não anda se o destino for um tile sólido. - if (!Map_Data.IsTileWalkable(finalDestination)) return; + if (!Map_Data.IsTileWalkable(Destination)) return; // Não anda se o destino for oculpado por um ator. // Na maioria dos casos, essa condição nunca é verdadeira. - if (GetBlockingActorAtPosition(finalDestination) != null) return; + if (GetTargetActor() != null) return; actor.Walk(Offset); } |
