Skip to content

Commit

Permalink
Fix a crash in the TSEditorResourceLayer neighbour validation
Browse files Browse the repository at this point in the history
  • Loading branch information
abcdefg30 authored and reaperrr committed Nov 11, 2021
1 parent 31cec0c commit 9916e4c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions OpenRA.Mods.Cnc/Traits/World/TSEditorResourceLayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ public TSEditorResourceLayer(Actor self, TSEditorResourceLayerInfo info)

bool IsValidVeinNeighbour(CPos cell, CPos neighbour)
{
if (!Map.Contains(neighbour))
return false;

// Cell is automatically valid if it contains a veinhole actor
if (actorLayer.PreviewsAt(neighbour).Any(a => info.VeinholeActors.Contains(a.Info.Name)))
return true;
Expand Down

0 comments on commit 9916e4c

Please sign in to comment.