fixed Building.unitInfo

This commit is contained in:
Bob
2010-01-12 20:18:36 +13:00
parent d5d6812e07
commit 4a004eda0f
9 changed files with 40 additions and 38 deletions

View File

@@ -24,8 +24,8 @@ namespace OpenRa.Game.Traits
{
if( order.OrderString == "DeployMcv" )
{
var factBuildingInfo = (LegacyBuildingInfo)Rules.UnitInfo[ "fact" ];
if( Game.CanPlaceBuilding( factBuildingInfo, self.Location - new int2( 1, 1 ), self, false ) )
var factBuildingInfo = Rules.NewUnitInfo[ "fact" ].Traits.Get<BuildingInfo>();
if( Game.CanPlaceBuilding( "fact", factBuildingInfo, self.Location - new int2( 1, 1 ), self, false ) )
{
self.CancelActivity();
self.QueueActivity( new Turn( 96 ) );