summaryrefslogtreecommitdiff
path: root/scripts/actors/actions
diff options
context:
space:
mode:
authorMatheus <matheus.guedes.mg.m@gmail.com>2025-08-17 20:03:46 -0300
committerMatheus <matheus.guedes.mg.m@gmail.com>2025-08-17 20:03:46 -0300
commit6fb1eb6a6fe0f3f4c2f4e9d7fc476566168eba5d (patch)
tree89b89e2d991d2e83fb8398044120115b39112bad /scripts/actors/actions
parentca782d7310f2df854a8727535ac92337c85ed445 (diff)
Refactor
Diffstat (limited to 'scripts/actors/actions')
-rw-r--r--scripts/actors/actions/MovementAction.cs4
1 files changed, 1 insertions, 3 deletions
diff --git a/scripts/actors/actions/MovementAction.cs b/scripts/actors/actions/MovementAction.cs
index f29e2e8..8d864bd 100644
--- a/scripts/actors/actions/MovementAction.cs
+++ b/scripts/actors/actions/MovementAction.cs
@@ -13,9 +13,7 @@ public partial class MovementAction : Action
{
Vector2I finalDestination = actor.GridPosition + Offset;
- TileData tile = game.Dungeon.GetCellTileData(finalDestination);
-
- if (tile == null || !(bool) tile.GetCustomData("isWalkable")) return;
+ if (!game.Map.IsTileWalkable(finalDestination)) return;
actor.Walk(Offset);
}