fix linebuild

This commit is contained in:
Bob
2010-04-03 00:15:12 +12:00
committed by Chris Forbes
parent 2a5d756191
commit 3caa0a3431
2 changed files with 27 additions and 15 deletions

View File

@@ -57,13 +57,10 @@ namespace OpenRA.Orders
yield break;
}
yield return new Order("PlaceBuilding", Producer.Owner.PlayerActor, topLeft, Building);
// Linebuild for walls.
// Assumes a 1x1 footprint; weird things will happen for other footprints
if (Rules.Info[ Building ].Traits.Contains<LineBuildInfo>())
foreach( var t in LineBuildUtils.GetLineBuildCells( world, topLeft, Building, BuildingInfo ))
yield return new Order("PlaceBuilding", Producer.Owner.PlayerActor, t, Building);
yield return new Order("LineBuild", Producer.Owner.PlayerActor, topLeft, Building);
else
yield return new Order("PlaceBuilding", Producer.Owner.PlayerActor, topLeft, Building);
}
}