Fix airstrike and paratroopers power not removing cameras at the map edge
This commit is contained in:
@@ -131,9 +131,9 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
aircraftInRange[a] = false;
|
aircraftInRange[a] = false;
|
||||||
|
|
||||||
// Checking for attack range is not relevant here because
|
// Checking for attack range is not relevant here because
|
||||||
// aircraft may be shot down before entering. Thus we remove
|
// aircraft may be shot down before entering the range.
|
||||||
// the camera and beacon only if the whole squad is dead.
|
// If at the map's edge, they may be removed from world before leaving.
|
||||||
if (aircraftInRange.All(kv => kv.Key.IsDead))
|
if (aircraftInRange.All(kv => !kv.Key.IsInWorld))
|
||||||
{
|
{
|
||||||
RemoveCamera(camera);
|
RemoveCamera(camera);
|
||||||
RemoveBeacon(beacon);
|
RemoveBeacon(beacon);
|
||||||
|
|||||||
@@ -161,9 +161,9 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
aircraftInRange[a] = false;
|
aircraftInRange[a] = false;
|
||||||
|
|
||||||
// Checking for attack range is not relevant here because
|
// Checking for attack range is not relevant here because
|
||||||
// aircraft may be shot down before entering. Thus we remove
|
// aircraft may be shot down before entering the range.
|
||||||
// the camera and beacon only if the whole squad is dead.
|
// If at the map's edge, they may be removed from world before leaving.
|
||||||
if (aircraftInRange.All(kv => kv.Key.IsDead))
|
if (aircraftInRange.All(kv => !kv.Key.IsInWorld))
|
||||||
{
|
{
|
||||||
RemoveCamera(camera);
|
RemoveCamera(camera);
|
||||||
RemoveBeacon(beacon);
|
RemoveBeacon(beacon);
|
||||||
|
|||||||
Reference in New Issue
Block a user