Everything related to chat functionality, and updating the projectile prefab to rotate properly
This commit is contained in:
parent
d92d00c83f
commit
66f84652dc
14 changed files with 1133 additions and 121 deletions
|
|
@ -694,10 +694,21 @@ namespace TD.Levels.Editor
|
|||
var t = bfsQueue.Dequeue();
|
||||
if (exitTiles.Contains(t)) { reachedExit = true; break; }
|
||||
|
||||
foreach (var n in GridCoordinates.GetNeighbors(t))
|
||||
// 8-connected with corner-cut prevention — must match the
|
||||
// runtime PathfindingService / TowerPlacementManager rules.
|
||||
foreach (var n in GridCoordinates.GetNeighbors8(t))
|
||||
{
|
||||
if (bfsVisited.Contains(n)) continue;
|
||||
if (!walkableSet.Contains(n)) continue;
|
||||
|
||||
if (GridCoordinates.IsDiagonal(t, n))
|
||||
{
|
||||
GridCoordinates.GetCornerShoulders(t, n,
|
||||
out var shoulderA, out var shoulderB);
|
||||
if (!walkableSet.Contains(shoulderA) || !walkableSet.Contains(shoulderB))
|
||||
continue;
|
||||
}
|
||||
|
||||
bfsVisited.Add(n);
|
||||
bfsQueue.Enqueue(n);
|
||||
}
|
||||
|
|
@ -871,10 +882,21 @@ namespace TD.Levels.Editor
|
|||
while (queue.Count > 0)
|
||||
{
|
||||
var t = queue.Dequeue();
|
||||
foreach (var n in GridCoordinates.GetNeighbors(t))
|
||||
// 8-connected with corner-cut prevention — keeps component
|
||||
// counting consistent with pathfinding semantics.
|
||||
foreach (var n in GridCoordinates.GetNeighbors8(t))
|
||||
{
|
||||
if (visited.Contains(n)) continue;
|
||||
if (!walkable.Contains(n)) continue;
|
||||
|
||||
if (GridCoordinates.IsDiagonal(t, n))
|
||||
{
|
||||
GridCoordinates.GetCornerShoulders(t, n,
|
||||
out var shoulderA, out var shoulderB);
|
||||
if (!walkable.Contains(shoulderA) || !walkable.Contains(shoulderB))
|
||||
continue;
|
||||
}
|
||||
|
||||
visited.Add(n);
|
||||
queue.Enqueue(n);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue