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
|
|
@ -494,10 +494,25 @@ namespace TD.Gameplay
|
|||
if (exitTiles.Contains(current))
|
||||
return true;
|
||||
|
||||
foreach (var neighbor in GridCoordinates.GetNeighbors(current))
|
||||
// 8-connected expansion to match enemy pathfinding. A 4-connected
|
||||
// BFS here would reject placements enemies could actually navigate
|
||||
// around via diagonals, OR accept placements that diagonally squeeze
|
||||
// through corners. Corner-cut prevention keeps the maze rule consistent
|
||||
// with PathfindingService: a diagonal step requires both shoulder
|
||||
// cardinal tiles to be walkable.
|
||||
foreach (var neighbor in GridCoordinates.GetNeighbors8(current))
|
||||
{
|
||||
if (bfsVisited.Contains(neighbor)) continue;
|
||||
if (!loader.IsWalkable(neighbor)) continue;
|
||||
|
||||
if (GridCoordinates.IsDiagonal(current, neighbor))
|
||||
{
|
||||
GridCoordinates.GetCornerShoulders(current, neighbor,
|
||||
out var shoulderA, out var shoulderB);
|
||||
if (!loader.IsWalkable(shoulderA) || !loader.IsWalkable(shoulderB))
|
||||
continue;
|
||||
}
|
||||
|
||||
bfsVisited.Add(neighbor);
|
||||
bfsQueue.Enqueue(neighbor);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue