Don’t crash if a warhead smudge extends outside the map. Fixes #6548.
This commit is contained in:
@@ -95,6 +95,9 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
var world = firedBy.World;
|
var world = firedBy.World;
|
||||||
var targetTile = world.Map.CellContaining(pos);
|
var targetTile = world.Map.CellContaining(pos);
|
||||||
|
if (!world.Map.Contains(targetTile))
|
||||||
|
return false;
|
||||||
|
|
||||||
var impactType = GetImpactType(world, targetTile, pos);
|
var impactType = GetImpactType(world, targetTile, pos);
|
||||||
if (!ValidImpactTypes.HasFlag(impactType) || InvalidImpactTypes.HasFlag(impactType))
|
if (!ValidImpactTypes.HasFlag(impactType) || InvalidImpactTypes.HasFlag(impactType))
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user