Move GetTerrainIndex/Info from WorldUtils to Map

This commit is contained in:
Pavlos Touboulidis
2014-06-13 13:57:32 +03:00
parent 0cf2d608e4
commit c282fa1077
20 changed files with 43 additions and 39 deletions

View File

@@ -160,9 +160,8 @@ namespace OpenRA.Mods.RA.Effects
var shouldExplode = (pos.Z < 0) // Hit the ground
|| (dist.LengthSquared < MissileCloseEnough.Range * MissileCloseEnough.Range) // Within range
|| (info.RangeLimit != 0 && ticks > info.RangeLimit) // Ran out of fuel
|| (!info.High && world.ActorMap.GetUnitsAt(cell)
.Any(a => a.HasTrait<IBlocksBullets>())) // Hit a wall
|| (!string.IsNullOrEmpty(info.BoundToTerrainType) && world.GetTerrainInfo(cell).Type != info.BoundToTerrainType); // Hit incompatible terrain
|| (!info.High && world.ActorMap.GetUnitsAt(cell).Any(a => a.HasTrait<IBlocksBullets>())) // Hit a wall
|| (!string.IsNullOrEmpty(info.BoundToTerrainType) && world.Map.GetTerrainInfo(cell).Type != info.BoundToTerrainType); // Hit incompatible terrain
if (shouldExplode)
Explode(world);