Remove obsolete LocomotorInfo caching.

This commit is contained in:
Paul Chote
2020-10-10 21:01:30 +01:00
committed by Matthias Mailänder
parent 49e7a33db0
commit 5a7dc385a3
10 changed files with 35 additions and 94 deletions

View File

@@ -72,7 +72,7 @@ namespace OpenRA.Mods.Common.Traits
}
// If a water-land transition is required, bail early
if (domainIndex != null && !domainIndex.IsPassable(source, target, locomotor.Info))
if (domainIndex != null && !domainIndex.IsPassable(source, target, locomotor))
return EmptyPath;
var distance = source - target;
@@ -119,7 +119,7 @@ namespace OpenRA.Mods.Common.Traits
// Really, we only need to check the circle perimeter, but it's not clear that would be a performance win
if (domainIndex != null)
{
tilesInRange = new List<CPos>(tilesInRange.Where(t => domainIndex.IsPassable(source, t, locomotor.Info)));
tilesInRange = new List<CPos>(tilesInRange.Where(t => domainIndex.IsPassable(source, t, locomotor)));
if (!tilesInRange.Any())
return EmptyPath;
}