Fix Crash when Mcv: UnitsCommonName is empty.
This commit is contained in:
committed by
Paul Chote
parent
15354f52c1
commit
841c873276
@@ -1186,7 +1186,7 @@ namespace OpenRA.Mods.Common.AI
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// No construction yards - Build a new MCV
|
// No construction yards - Build a new MCV
|
||||||
if (!HasAdequateFact() && !self.World.Actors.Any(a => a.Owner == Player &&
|
if (Info.UnitsCommonNames.Mcv.Any() && !HasAdequateFact() && !self.World.Actors.Any(a => a.Owner == Player &&
|
||||||
Info.UnitsCommonNames.Mcv.Contains(a.Info.Name)))
|
Info.UnitsCommonNames.Mcv.Contains(a.Info.Name)))
|
||||||
BuildUnit("Vehicle", GetInfoByCommonName(Info.UnitsCommonNames.Mcv, Player).Name);
|
BuildUnit("Vehicle", GetInfoByCommonName(Info.UnitsCommonNames.Mcv, Player).Name);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user