Fix aircraft losing selection outside the map borders

Fixes #5651
This commit is contained in:
Oliver Brakmann
2014-07-16 13:14:44 +02:00
parent 8bce37710b
commit 42f963d687

View File

@@ -61,7 +61,7 @@ namespace OpenRA
public void Tick(World world) public void Tick(World world)
{ {
actors.RemoveAll(a => !a.IsInWorld || world.FogObscures(a)); actors.RemoveAll(a => !a.IsInWorld || (a.Owner != world.LocalPlayer && world.FogObscures(a)));
foreach (var cg in controlGroups.Values) foreach (var cg in controlGroups.Values)
// note: NOT `!a.IsInWorld`, since that would remove things that are in transports. // note: NOT `!a.IsInWorld`, since that would remove things that are in transports.
@@ -88,7 +88,7 @@ namespace OpenRA
return; return;
} }
var groupActors = controlGroups[group].Where(a => !a.IsDead() && !world.FogObscures(a)); var groupActors = controlGroups[group].Where(a => !a.IsDead());
if (mods.HasModifier(Modifiers.Alt) || MultiTapCount >= 2) if (mods.HasModifier(Modifiers.Alt) || MultiTapCount >= 2)
{ {