Fix a crash in the TSEditorResourceLayer neighbour validation
This commit is contained in:
@@ -42,6 +42,9 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
|
|
||||||
bool IsValidVeinNeighbour(CPos cell, CPos neighbour)
|
bool IsValidVeinNeighbour(CPos cell, CPos neighbour)
|
||||||
{
|
{
|
||||||
|
if (!Map.Contains(neighbour))
|
||||||
|
return false;
|
||||||
|
|
||||||
// Cell is automatically valid if it contains a veinhole actor
|
// Cell is automatically valid if it contains a veinhole actor
|
||||||
if (actorLayer.PreviewsAt(neighbour).Any(a => info.VeinholeActors.Contains(a.Info.Name)))
|
if (actorLayer.PreviewsAt(neighbour).Any(a => info.VeinholeActors.Contains(a.Info.Name)))
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user