Some parts of some buildings are pathable.

- not handling WEAP/FIX yet; that's special-case logic.
This commit is contained in:
Bob
2009-10-13 19:11:32 +13:00
parent c6e739d162
commit 9ba0a632e2
5 changed files with 40 additions and 21 deletions

View File

@@ -53,5 +53,23 @@ namespace OpenRa.Game.GameRules
++j;
}
}
public static IEnumerable<int2> UnpathableTiles( string name, int2 position )
{
var footprint = Rules.Footprint.GetFootprint( name );
var j = 0;
foreach( var row in footprint )
{
var i = 0;
foreach( var c in row )
{
if( c == 'x' )
yield return position + new int2( i, j );
++i;
}
++j;
}
}
}
}