Use MobileInfo.GetMovementClass for domain indexing, clearing path for caching and smarter behavior

* Move DomainIndex from being a manual hard-coded hook in World to an IWorldLoaded trait.
This commit is contained in:
Andrew Aldridge
2013-06-26 23:38:01 -04:00
parent 6fb01c7ab8
commit ba885907ba
9 changed files with 169 additions and 119 deletions

View File

@@ -111,7 +111,6 @@ namespace OpenRA
}
}
public DomainIndex WorldDomains;
internal World(Manifest manifest, Map map, OrderManager orderManager, bool isShellmap)
{
IsShellmap = isShellmap;
@@ -122,9 +121,6 @@ namespace OpenRA
TileSet = Rules.TileSets[Map.Tileset];
TileSet.LoadTiles();
// Identify untraversable regions of the map for faster pathfinding, especially with AI
WorldDomains = new DomainIndex(this);
SharedRandom = new XRandom(orderManager.LobbyInfo.GlobalSettings.RandomSeed);
WorldActor = CreateActor( "World", new TypeDictionary() );