Don’t crash if a warhead smudge extends outside the map. Fixes #6548.

This commit is contained in:
Paul Chote
2014-09-24 22:26:45 +12:00
parent 17702dc057
commit 3c2383ebc6

View File

@@ -95,6 +95,9 @@ namespace OpenRA.Mods.RA
{
var world = firedBy.World;
var targetTile = world.Map.CellContaining(pos);
if (!world.Map.Contains(targetTile))
return false;
var impactType = GetImpactType(world, targetTile, pos);
if (!ValidImpactTypes.HasFlag(impactType) || InvalidImpactTypes.HasFlag(impactType))
return false;