Cache cell ramps to avoid repeated tileset lookups.

This commit is contained in:
Paul Chote
2020-05-04 00:20:48 +01:00
committed by atlimit8
parent 1354ffc32e
commit 4614f6febe
9 changed files with 37 additions and 56 deletions

View File

@@ -83,9 +83,7 @@ namespace OpenRA.Mods.Common.Traits
if (jli.JumpjetTransitionOnRamps)
return true;
var tile = map.Tiles[cell];
var ti = map.Rules.TileSet.GetTileInfo(tile);
return ti == null || ti.RampType == 0;
return map.Ramp[cell] == 0;
}
int ICustomMovementLayer.EntryMovementCost(ActorInfo a, LocomotorInfo li, CPos cell)