don't fail with offscreen impacts

This commit is contained in:
Chris Forbes
2010-06-13 00:25:14 +12:00
parent 3c95a2886c
commit 7812e1c314

View File

@@ -44,6 +44,10 @@ namespace OpenRA
{
var world = args.firedBy.World;
var targetTile = ((1f / Game.CellSize) * args.dest.ToFloat2()).ToInt2();
if (!world.Map.IsInMap(targetTile))
return;
var isWater = world.GetTerrainType(targetTile) == TerrainType.Water;
if (warhead.Explosion != 0)