Add Guard support to Aircraft.

This commit is contained in:
Paul Chote
2014-01-13 22:15:14 +13:00
parent 1759d73ed7
commit 697b50c149
5 changed files with 7 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
NEW: NEW:
All Mods: All Mods:
An error dialog is now displayed when server connections are lost. An error dialog is now displayed when server connections are lost.
Added AttackMove and Guard abilities to Aircraft and Helicopters.
Unified the main menu navigation between TD and other mods: Unified the main menu navigation between TD and other mods:
Moved Create Game and Direct Connect facilities to the server browser. Moved Create Game and Direct Connect facilities to the server browser.
Added skirmish mode to RA and D2k to complement TD's skirmish mode. Added skirmish mode to RA and D2k to complement TD's skirmish mode.
@@ -18,7 +19,6 @@ NEW:
Fixed transparency glitches in the sniper icon. Fixed transparency glitches in the sniper icon.
Tiberian Dawn: Tiberian Dawn:
Commando can now plant C4 on bridges. Commando can now plant C4 on bridges.
Helicopters can now AttackMove.
Engine: Engine:
Converted Aircraft CruiseAltitude to world coordinates. Converted Aircraft CruiseAltitude to world coordinates.
Converted Health Radius to world coordinates. Converted Health Radius to world coordinates.

View File

@@ -16,7 +16,7 @@ namespace OpenRA.Mods.RA.Activities
public class Follow : Activity public class Follow : Activity
{ {
Target target; Target target;
Mobile mobile; IMove move;
WRange range; WRange range;
int nextPathTime; int nextPathTime;
@@ -26,7 +26,7 @@ namespace OpenRA.Mods.RA.Activities
public Follow(Actor self, Target target, WRange range) public Follow(Actor self, Target target, WRange range)
{ {
this.target = target; this.target = target;
mobile = self.Trait<Mobile>(); move = self.Trait<IMove>();
this.range = range; this.range = range;
} }
@@ -41,7 +41,7 @@ namespace OpenRA.Mods.RA.Activities
nextPathTime = self.World.SharedRandom.Next(delayBetweenPathingAttempts - delaySpread, nextPathTime = self.World.SharedRandom.Next(delayBetweenPathingAttempts - delaySpread,
delayBetweenPathingAttempts + delaySpread); delayBetweenPathingAttempts + delaySpread);
return Util.SequenceActivities(mobile.MoveWithinRange(target, range), this); return Util.SequenceActivities(move.MoveWithinRange(target, range), this);
} }
} }
} }

View File

@@ -18,7 +18,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA
{ {
class GuardInfo : TraitInfo<Guard>, Requires<MobileInfo> { } class GuardInfo : TraitInfo<Guard> { }
class Guard : IResolveOrder, IOrderVoice class Guard : IResolveOrder, IOrderVoice
{ {

View File

@@ -116,6 +116,7 @@
EmptyWeapon: HeliExplode EmptyWeapon: HeliExplode
CombatDebugOverlay: CombatDebugOverlay:
AttackMove: AttackMove:
Guard:
BodyOrientation: BodyOrientation:
UpdatesPlayerStatistics: UpdatesPlayerStatistics:
Huntable: Huntable:

View File

@@ -197,6 +197,7 @@
GroundedTargetTypes: Ground GroundedTargetTypes: Ground
HiddenUnderFog: HiddenUnderFog:
AttackMove: AttackMove:
Guard:
GainsExperience: GainsExperience:
GivesExperience: GivesExperience:
DrawLineToTarget: DrawLineToTarget: