Change spacebar key to move to the last visible radar ping location

This commit is contained in:
ScottNZ
2014-02-21 22:11:43 +13:00
parent 06caf7f156
commit 0a9a959ecf
4 changed files with 13 additions and 15 deletions

View File

@@ -30,6 +30,8 @@ namespace OpenRA.Mods.RA
public readonly List<RadarPing> Pings = new List<RadarPing>();
readonly RadarPingsInfo info;
public WPos? LastPingPosition;
public RadarPings(RadarPingsInfo info)
{
this.info = info;
@@ -46,7 +48,12 @@ namespace OpenRA.Mods.RA
{
var ping = new RadarPing(isVisible, position, color, duration,
info.FromRadius, info.ToRadius, info.ShrinkSpeed, info.RotationSpeed);
if (ping.IsVisible())
LastPingPosition = ping.Position;
Pings.Add(ping);
return ping;
}