Reset Locomotor cache on world loaded
This commit is contained in:
@@ -71,6 +71,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
else if (locomotorInfos.Count(li => li.Name == Locomotor) > 1)
|
||||
throw new YamlException("There is more than one locomotor named '{0}'.".F(Locomotor));
|
||||
|
||||
// We need to reset the reference to the locomotor between each worlds, otherwise we are reference the previous state.
|
||||
locomotor = null;
|
||||
|
||||
base.RulesetLoaded(rules, ai);
|
||||
}
|
||||
|
||||
|
||||
@@ -380,7 +380,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
blockingCache = new CellLayer<CellCache>(map);
|
||||
cellsCost = new CellLayer<short>(map);
|
||||
|
||||
|
||||
terrainInfos = Info.TilesetTerrainInfo[map.Rules.TileSet];
|
||||
|
||||
foreach (var cell in map.AllCells)
|
||||
|
||||
Reference in New Issue
Block a user