trying to prevent error

This commit is contained in:
2026-06-09 20:02:48 -04:00
parent e243d45d27
commit 86113141bf
+5 -2
View File
@@ -91,8 +91,11 @@ public partial class Map : TileMapLayer
public void SetCellEnemy(Vector2I ADDRESS, Enemy ENEMY)
{
_addressOccupants[ENEMY._address] = null;
SetCellSolid(ENEMY._address);
if (ENEMY._address != -Vector2I.One)
{
_addressOccupants[ENEMY._address] = null;
SetCellSolid(ENEMY._address);
}
ENEMY._address = ADDRESS;