AI will now defend MCV as if it was a harvester or a building.

Adjusted comments.
This commit is contained in:
GSonderling
2018-01-01 23:01:53 +01:00
committed by ltem
parent 9f8ebdce42
commit 69e6e033a6

View File

@@ -1257,8 +1257,8 @@ namespace OpenRA.Mods.Common.AI
if (!e.Attacker.Info.HasTraitInfo<ITargetableInfo>())
return;
// Protected harvesters or building
if ((self.Info.HasTraitInfo<HarvesterInfo>() || self.Info.HasTraitInfo<BuildingInfo>()) &&
// Protected priority assets, MCVs, harvesters and buildings
if ((self.Info.HasTraitInfo<HarvesterInfo>() || self.Info.HasTraitInfo<BuildingInfo>() || self.Info.HasTraitInfo<BaseBuildingInfo>()) &&
Player.Stances[e.Attacker.Owner] == Stance.Enemy)
{
defenseCenter = e.Attacker.Location;