mirror of
https://github.com/amevarashi/RJW-Sexperience.git
synced 2024-08-14 23:54:08 +00:00
Fixed GetAdjacentBuildings error when called at map edge
This commit is contained in:
parent
e37f45399e
commit
fed4b54915
1 changed files with 1 additions and 1 deletions
|
@ -59,7 +59,7 @@ namespace RJWSexperience
|
|||
results.Add(building);
|
||||
foreach (IntVec3 pos in GenAdjFast.AdjacentCells8Way(pawn.Position))
|
||||
{
|
||||
if (edifice[pos] is T adjBuilding)
|
||||
if (pos.InBounds(pawn.Map) && edifice[pos] is T adjBuilding)
|
||||
results.Add(adjBuilding);
|
||||
}
|
||||
return results;
|
||||
|
|
Loading…
Reference in a new issue