debugging

This commit is contained in:
2026-06-09 19:43:36 -04:00
parent 9a0a33b82c
commit d2993b17a4
2 changed files with 18 additions and 24 deletions
+9 -16
View File
@@ -93,11 +93,19 @@ public partial class Map : TileMapLayer
{
_addressOccupants[ENEMY._address] = null;
SetCellSolid(ENEMY._address);
if (ENEMY._address == Vector2I.Zero)
{
GD.Print(4,_astar.IsPointSolid(ENEMY._address));
}
ENEMY._address = ADDRESS;
_addressOccupants[ADDRESS] = ENEMY;
SetCellSolid(ADDRESS);
if (ADDRESS == Vector2I.Zero)
{
GD.Print(5,_astar.IsPointSolid(ADDRESS));
}
}
public void SetCellSolid(Vector2I ADDRESS)
@@ -120,24 +128,9 @@ public partial class Map : TileMapLayer
public List<Vector2I> GetPath(Vector2I FROM, Vector2I TO, bool INCLUDE_FROM = false)
{
_astar.SetPointSolid(FROM, false);
if (FROM == Vector2I.Zero)
{
// GD.Print(4,_astar.IsPointSolid(FROM));
}
if (TO == Vector2I.Zero)
{
// GD.Print(5,_astar.IsPointSolid(FROM));
}
List<Vector2I> pathTaken = [.. _astar.GetIdPath(FROM, TO, true)];
_astar.SetPointSolid(FROM, true);
if (FROM == Vector2I.Zero)
{
// GD.Print(6,_astar.IsPointSolid(FROM));
}
if (TO == Vector2I.Zero)
{
// GD.Print(7,_astar.IsPointSolid(FROM));
}
if (!INCLUDE_FROM)
{