This commit is contained in:
Matthias Mailänder
2014-07-04 17:14:48 +02:00
parent 7b5f000ba0
commit 1e2e7bcf42
7 changed files with 16 additions and 15 deletions

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
@@ -24,11 +24,11 @@ namespace OpenRA.Mods.RA
public class RallyPoint : IIssueOrder, IResolveOrder, ISync
{
[Sync] public CPos rallyPoint;
[Sync] public CPos Location;
public RallyPoint(Actor self, RallyPointInfo info)
{
rallyPoint = self.Location + info.RallyPoint;
Location = self.Location + info.RallyPoint;
self.World.AddFrameEndTask(w => w.Add(new Effects.RallyPoint(self, info.IndicatorPalettePrefix)));
}
@@ -37,7 +37,7 @@ namespace OpenRA.Mods.RA
get { yield return new RallyPointOrderTargeter(); }
}
public Order IssueOrder( Actor self, IOrderTargeter order, Target target, bool queued )
public Order IssueOrder(Actor self, IOrderTargeter order, Target target, bool queued)
{
if (order.OrderID == "SetRallyPoint")
return new Order(order.OrderID, self, false) { TargetLocation = self.World.Map.CellContaining(target.CenterPosition), SuppressVisualFeedback = true };
@@ -45,10 +45,10 @@ namespace OpenRA.Mods.RA
return null;
}
public void ResolveOrder( Actor self, Order order )
public void ResolveOrder(Actor self, Order order)
{
if( order.OrderString == "SetRallyPoint" )
rallyPoint = order.TargetLocation;
if (order.OrderString == "SetRallyPoint")
Location = order.TargetLocation;
}
class RallyPointOrderTargeter : IOrderTargeter
@@ -67,6 +67,7 @@ namespace OpenRA.Mods.RA
cursor = "ability";
return true;
}
return false;
}