Merge pull request #4853 from pchote/airstrike-fixup

Airstrike improvements
This commit is contained in:
Matthias Mailänder
2014-03-12 15:42:08 +01:00
24 changed files with 195 additions and 106 deletions

View File

@@ -173,7 +173,6 @@
<Compile Include="Traits\TraitsInterfaces.cs" /> <Compile Include="Traits\TraitsInterfaces.cs" />
<Compile Include="Traits\Util.cs" /> <Compile Include="Traits\Util.cs" />
<Compile Include="Traits\ValidateOrder.cs" /> <Compile Include="Traits\ValidateOrder.cs" />
<Compile Include="Traits\Waypoint.cs" />
<Compile Include="Traits\World\Country.cs" /> <Compile Include="Traits\World\Country.cs" />
<Compile Include="Traits\World\ResourceLayer.cs" /> <Compile Include="Traits\World\ResourceLayer.cs" />
<Compile Include="Traits\World\ResourceType.cs" /> <Compile Include="Traits\World\ResourceType.cs" />

View File

@@ -28,8 +28,10 @@ namespace OpenRA.Mods.Cnc
return new SelectGenericPowerTarget(order, manager, "ioncannon", MouseButton.Left); return new SelectGenericPowerTarget(order, manager, "ioncannon", MouseButton.Left);
} }
public override void Activate(Actor self, Order order) public override void Activate(Actor self, Order order, SupportPowerManager manager)
{ {
base.Activate(self, order, manager);
self.World.AddFrameEndTask(w => self.World.AddFrameEndTask(w =>
{ {
Sound.Play(Info.LaunchSound, order.TargetLocation.CenterPosition); Sound.Play(Info.LaunchSound, order.TargetLocation.CenterPosition);

View File

@@ -23,48 +23,34 @@ namespace OpenRA.Mods.RA
[Desc("Armament name")] [Desc("Armament name")]
public readonly string Guns = "secondary"; public readonly string Guns = "secondary";
public readonly int FacingTolerance = 2; public readonly int FacingTolerance = 2;
public readonly WRange VisionRange = WRange.FromCells(10);
public override object Create(ActorInitializer init) { return new AttackBomber(init.self, this); } public override object Create(ActorInitializer init) { return new AttackBomber(init.self, this); }
} }
class AttackBomber : AttackBase, ISync, INotifyKilled class AttackBomber : AttackBase, ISync, INotifyRemovedFromWorld
{ {
AttackBomberInfo info; AttackBomberInfo info;
Actor camera;
[Sync] Target target; [Sync] Target target;
[Sync] bool inAttackRange;
public event Action<Actor> OnRemovedFromWorld = self => { };
public event Action<Actor> OnEnteredAttackRange = self => { };
public event Action<Actor> OnExitedAttackRange = self => { };
public AttackBomber(Actor self, AttackBomberInfo info) public AttackBomber(Actor self, AttackBomberInfo info)
: base(self, info) : base(self, info)
{ {
this.info = info; this.info = info;
this.camera = null;
} }
public override void Tick(Actor self) public override void Tick(Actor self)
{ {
base.Tick(self); base.Tick(self);
var facing = self.TraitOrDefault<IFacing>();
var cp = self.CenterPosition; var cp = self.CenterPosition;
var bombTarget = Target.FromPos(cp - new WVec(0, 0, cp.Z)); var bombTarget = Target.FromPos(cp - new WVec(0, 0, cp.Z));
var wasInAttackRange = inAttackRange;
// Provide vision inAttackRange = false;
if (this.camera == null &&
target.IsInRange(self.CenterPosition, this.info.VisionRange))
{
this.camera = self.World.CreateActor("camera", new TypeDictionary
{
new LocationInit(target.CenterPosition.ToCPos()),
new OwnerInit(self.Owner),
});
}
else if (this.camera != null &&
!target.IsInRange(self.CenterPosition, this.info.VisionRange))
{
self.World.Remove(this.camera);
this.camera = null;
}
// Bombs drop anywhere in range // Bombs drop anywhere in range
foreach (var a in Armaments.Where(a => a.Info.Name == info.Bombs)) foreach (var a in Armaments.Where(a => a.Info.Name == info.Bombs))
@@ -72,39 +58,43 @@ namespace OpenRA.Mods.RA
if (!target.IsInRange(self.CenterPosition, a.Weapon.Range)) if (!target.IsInRange(self.CenterPosition, a.Weapon.Range))
continue; continue;
a.CheckFire(self, this, facing, bombTarget); inAttackRange = true;
a.CheckFire(self, this, facing.Value, bombTarget);
} }
// Guns only fire when approaching the target // Guns only fire when approaching the target
var facingToTarget = Util.GetFacing(target.CenterPosition - self.CenterPosition, facing.Facing); var f = facing.Value.Facing;
if (Math.Abs(facingToTarget - facing.Facing) % 256 > info.FacingTolerance) var facingToTarget = Util.GetFacing(target.CenterPosition - self.CenterPosition, f);
return; if (Math.Abs(facingToTarget - f) % 256 <= info.FacingTolerance)
{
foreach (var a in Armaments.Where(a => a.Info.Name == info.Guns)) foreach (var a in Armaments.Where(a => a.Info.Name == info.Guns))
{ {
if (!target.IsInRange(self.CenterPosition, a.Weapon.Range)) if (!target.IsInRange(self.CenterPosition, a.Weapon.Range))
continue; continue;
var t = Target.FromPos(cp - new WVec(0, a.Weapon.Range.Range / 2, cp.Z).Rotate(WRot.FromFacing(facing.Facing))); var t = Target.FromPos(cp - new WVec(0, a.Weapon.Range.Range / 2, cp.Z).Rotate(WRot.FromFacing(f)));
a.CheckFire(self, this, facing, t); inAttackRange = true;
a.CheckFire(self, this, facing.Value, t);
} }
} }
if (inAttackRange && !wasInAttackRange)
OnEnteredAttackRange(self);
if (!inAttackRange && wasInAttackRange)
OnExitedAttackRange(self);
}
public void SetTarget(WPos pos) { target = Target.FromPos(pos); } public void SetTarget(WPos pos) { target = Target.FromPos(pos); }
public void Killed(Actor self, AttackInfo e) public void RemovedFromWorld(Actor self)
{ {
if (this.camera != null) OnRemovedFromWorld(self);
{
self.World.Remove(this.camera);
this.camera = null;
}
} }
public override Activity GetAttackActivity(Actor self, Target newTarget, bool allowMove) public override Activity GetAttackActivity(Actor self, Target newTarget, bool allowMove)
{ {
// TODO: Player controlled units want this too! throw new NotImplementedException("AttackBomber requires a scripted target");
throw new NotImplementedException("CarpetBomb requires a scripted target");
} }
} }
} }

View File

@@ -63,6 +63,10 @@ namespace OpenRA.Mods.RA.Effects
public IEnumerable<IRenderable> Render(WorldRenderer wr) public IEnumerable<IRenderable> Render(WorldRenderer wr)
{ {
var cell = pos.ToCPos();
if (args.SourceActor.World.FogObscures(cell))
return SpriteRenderable.None;
return anim.Render(pos, wr.Palette("effect")); return anim.Render(pos, wr.Palette("effect"));
} }
} }

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information #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 * 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 * available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information, * as published by the Free Software Foundation. For more information,
@@ -10,19 +10,20 @@
using System.Collections.Generic; using System.Collections.Generic;
using OpenRA.FileFormats; using OpenRA.FileFormats;
using OpenRA.Traits;
namespace OpenRA.Traits namespace OpenRA.Mods.RA
{ {
class WaypointInfo : ITraitInfo, IOccupySpaceInfo class ImmobileInfo : ITraitInfo, IOccupySpaceInfo
{ {
public object Create( ActorInitializer init ) { return new Waypoint( init ); } public object Create(ActorInitializer init) { return new Immobile(init); }
} }
class Waypoint : IOccupySpace, ISync, INotifyAddedToWorld, INotifyRemovedFromWorld class Immobile : IOccupySpace, ISync, INotifyAddedToWorld, INotifyRemovedFromWorld
{ {
[Sync] readonly CPos location; [Sync] readonly CPos location;
public Waypoint(ActorInitializer init) public Immobile(ActorInitializer init)
{ {
this.location = init.Get<LocationInit, CPos>(); this.location = init.Get<LocationInit, CPos>();
} }

View File

@@ -481,6 +481,7 @@
<Compile Include="Modifiers\DisabledOverlay.cs" /> <Compile Include="Modifiers\DisabledOverlay.cs" />
<Compile Include="Widgets\Logic\ReplayControlBarLogic.cs" /> <Compile Include="Widgets\Logic\ReplayControlBarLogic.cs" />
<Compile Include="Widgets\Logic\GameTimerLogic.cs" /> <Compile Include="Widgets\Logic\GameTimerLogic.cs" />
<Compile Include="Immobile.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj"> <ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information #region Copyright & License Information
/* /*
* Copyright 2007-2013 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 * 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 * available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information, * as published by the Free Software Foundation. For more information,
@@ -9,6 +9,8 @@
#endregion #endregion
using System; using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.FileFormats; using OpenRA.FileFormats;
using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Activities;
using OpenRA.Mods.RA.Air; using OpenRA.Mods.RA.Air;
@@ -27,8 +29,18 @@ namespace OpenRA.Mods.RA
public readonly WRange Cordon = new WRange(5120); public readonly WRange Cordon = new WRange(5120);
[ActorReference] [ActorReference]
public readonly string FlareType = null; [Desc("Actor to spawn when the aircraft first enter the map")]
public readonly int FlareTime = 3000; // 2 minutes public readonly string FlareActor = null;
[Desc("Amount of time to keep the flare alive after the aircraft have finished attacking")]
public readonly int FlareRemoveDelay = 25;
[ActorReference]
[Desc("Actor to spawn when the aircraft start attacking")]
public readonly string CameraActor = null;
[Desc("Amount of time to keep the camera alive after the aircraft have finished attacking")]
public readonly int CameraRemoveDelay = 25;
public override object Create(ActorInitializer init) { return new AirstrikePower(init.self, this); } public override object Create(ActorInitializer init) { return new AirstrikePower(init.self, this); }
} }
@@ -38,10 +50,11 @@ namespace OpenRA.Mods.RA
public AirstrikePower(Actor self, AirstrikePowerInfo info) public AirstrikePower(Actor self, AirstrikePowerInfo info)
: base(self, info) { } : base(self, info) { }
public override void Activate(Actor self, Order order) public override void Activate(Actor self, Order order, SupportPowerManager manager)
{ {
var info = Info as AirstrikePowerInfo; base.Activate(self, order, manager);
var info = Info as AirstrikePowerInfo;
var attackFacing = Util.QuantizeFacing(self.World.SharedRandom.Next(256), info.QuantizedFacings) * (256 / info.QuantizedFacings); var attackFacing = Util.QuantizeFacing(self.World.SharedRandom.Next(256), info.QuantizedFacings) * (256 / info.QuantizedFacings);
var attackRotation = WRot.FromFacing(attackFacing); var attackRotation = WRot.FromFacing(attackFacing);
var delta = new WVec(0, -1024, 0).Rotate(attackRotation); var delta = new WVec(0, -1024, 0).Rotate(attackRotation);
@@ -51,24 +64,74 @@ namespace OpenRA.Mods.RA
var startEdge = target - (self.World.DistanceToMapEdge(target, -delta) + info.Cordon).Range * delta / 1024; var startEdge = target - (self.World.DistanceToMapEdge(target, -delta) + info.Cordon).Range * delta / 1024;
var finishEdge = target + (self.World.DistanceToMapEdge(target, delta) + info.Cordon).Range * delta / 1024; var finishEdge = target + (self.World.DistanceToMapEdge(target, delta) + info.Cordon).Range * delta / 1024;
Actor flare = null;
Actor camera = null;
Dictionary<Actor, bool> aircraftInRange = new Dictionary<Actor, bool>();
Action<Actor> onEnterRange = a =>
{
// Spawn a camera and remove the beacon when the first plane enters the target area
if (info.CameraActor != null && !aircraftInRange.Any(kv => kv.Value))
{
self.World.AddFrameEndTask(w => self.World.AddFrameEndTask(w =>
{ {
var notification = self.Owner.IsAlliedWith(self.World.RenderPlayer) ? Info.LaunchSound : Info.IncomingSound; camera = w.CreateActor(info.CameraActor, new TypeDictionary
Sound.Play(notification);
Actor flare = null;
if (info.FlareType != null)
{
flare = w.CreateActor(info.FlareType, new TypeDictionary
{ {
new LocationInit(order.TargetLocation), new LocationInit(order.TargetLocation),
new OwnerInit(self.Owner), new OwnerInit(self.Owner),
}); });
});
}
flare.QueueActivity(new Wait(info.FlareTime)); if (beacon != null)
{
self.World.AddFrameEndTask(w =>
{
w.Remove(beacon);
beacon = null;
});
}
aircraftInRange[a] = true;
};
Action<Actor> onExitRange = a =>
{
aircraftInRange[a] = false;
// Remove the camera and flare when the final plane leaves the target area
if (!aircraftInRange.Any(kv => kv.Value))
{
if (camera != null)
{
camera.QueueActivity(new Wait(info.CameraRemoveDelay));
camera.QueueActivity(new RemoveSelf());
}
if (flare != null)
{
flare.QueueActivity(new Wait(info.FlareRemoveDelay));
flare.QueueActivity(new RemoveSelf()); flare.QueueActivity(new RemoveSelf());
} }
camera = flare = null;
}
};
self.World.AddFrameEndTask(w =>
{
if (info.FlareActor != null)
{
flare = w.CreateActor(info.FlareActor, new TypeDictionary
{
new LocationInit(order.TargetLocation),
new OwnerInit(self.Owner),
});
}
var notification = self.Owner.IsAlliedWith(self.World.RenderPlayer) ? Info.LaunchSound : Info.IncomingSound;
Sound.Play(notification);
for (var i = -info.SquadSize / 2; i <= info.SquadSize / 2; i++) for (var i = -info.SquadSize / 2; i <= info.SquadSize / 2; i++)
{ {
// Even-sized squads skip the lead plane // Even-sized squads skip the lead plane
@@ -77,8 +140,8 @@ namespace OpenRA.Mods.RA
// Includes the 90 degree rotation between body and world coordinates // Includes the 90 degree rotation between body and world coordinates
var so = info.SquadOffset; var so = info.SquadOffset;
var spawnOffset = new WVec(i*so.Y, -Math.Abs(i)*so.X, 0).Rotate(attackRotation); var spawnOffset = new WVec(i * so.Y, -Math.Abs(i) * so.X, 0).Rotate(attackRotation);
var targetOffset = new WVec(i*so.Y, 0, 0).Rotate(attackRotation); var targetOffset = new WVec(i * so.Y, 0, 0).Rotate(attackRotation);
var a = w.CreateActor(info.UnitType, new TypeDictionary var a = w.CreateActor(info.UnitType, new TypeDictionary
{ {
@@ -87,13 +150,15 @@ namespace OpenRA.Mods.RA
new FacingInit(attackFacing), new FacingInit(attackFacing),
}); });
a.Trait<AttackBomber>().SetTarget(target + targetOffset); var attack = a.Trait<AttackBomber>();
attack.SetTarget(target + targetOffset);
if (flare != null) attack.OnEnteredAttackRange += onEnterRange;
a.QueueActivity(new CallFunc(() => flare.Destroy())); attack.OnExitedAttackRange += onExitRange;
attack.OnRemovedFromWorld += onExitRange;
a.QueueActivity(new Fly(a, Target.FromPos(finishEdge + spawnOffset))); a.QueueActivity(new Fly(a, Target.FromPos(finishEdge + spawnOffset)));
a.QueueActivity(new RemoveSelf()); a.QueueActivity(new RemoveSelf());
aircraftInRange.Add(a, false);
} }
}); });
} }

View File

@@ -34,8 +34,10 @@ namespace OpenRA.Mods.RA
return new SelectTarget(order, manager, this); return new SelectTarget(order, manager, this);
} }
public override void Activate(Actor self, Order order) public override void Activate(Actor self, Order order, SupportPowerManager manager)
{ {
base.Activate(self, order, manager);
foreach (var target in UnitsInRange(order.ExtraLocation)) foreach (var target in UnitsInRange(order.ExtraLocation))
{ {
var cs = target.Trait<Chronoshiftable>(); var cs = target.Trait<Chronoshiftable>();

View File

@@ -97,8 +97,10 @@ namespace OpenRA.Mods.RA
self.Owner.PlayerActor.Trait<SupportPowerManager>().Powers[key].Activate(new Order()); self.Owner.PlayerActor.Trait<SupportPowerManager>().Powers[key].Activate(new Order());
} }
public override void Activate(Actor self, Order order) public override void Activate(Actor self, Order order, SupportPowerManager manager)
{ {
base.Activate(self, order, manager);
self.World.AddFrameEndTask(w => self.World.AddFrameEndTask(w =>
{ {
Sound.PlayToPlayer(self.Owner, Info.LaunchSound); Sound.PlayToPlayer(self.Owner, Info.LaunchSound);

View File

@@ -34,8 +34,10 @@ namespace OpenRA.Mods.RA
return new SelectTarget(order, manager, this); return new SelectTarget(order, manager, this);
} }
public override void Activate(Actor self, Order order) public override void Activate(Actor self, Order order, SupportPowerManager manager)
{ {
base.Activate(self, order, manager);
self.Trait<RenderBuilding>().PlayCustomAnim(self, "active"); self.Trait<RenderBuilding>().PlayCustomAnim(self, "active");
Sound.Play("ironcur9.aud", order.TargetLocation.CenterPosition); Sound.Play("ironcur9.aud", order.TargetLocation.CenterPosition);

View File

@@ -38,8 +38,10 @@ namespace OpenRA.Mods.RA
return new SelectGenericPowerTarget(order, manager, "nuke", MouseButton.Left); return new SelectGenericPowerTarget(order, manager, "nuke", MouseButton.Left);
} }
public override void Activate(Actor self, Order order) public override void Activate(Actor self, Order order, SupportPowerManager manager)
{ {
base.Activate(self, order, manager);
if (self.Owner.IsAlliedWith(self.World.RenderPlayer)) if (self.Owner.IsAlliedWith(self.World.RenderPlayer))
Sound.Play(Info.LaunchSound); Sound.Play(Info.LaunchSound);
else else

View File

@@ -33,8 +33,10 @@ namespace OpenRA.Mods.RA
{ {
public ParatroopersPower(Actor self, ParatroopersPowerInfo info) : base(self, info) { } public ParatroopersPower(Actor self, ParatroopersPowerInfo info) : base(self, info) { }
public override void Activate(Actor self, Order order) public override void Activate(Actor self, Order order, SupportPowerManager manager)
{ {
base.Activate(self, order, manager);
var items = (Info as ParatroopersPowerInfo).DropItems; var items = (Info as ParatroopersPowerInfo).DropItems;
var startPos = self.World.ChooseRandomEdgeCell(); var startPos = self.World.ChooseRandomEdgeCell();

View File

@@ -18,8 +18,10 @@ namespace OpenRA.Mods.RA
public class SonarPulsePower : SupportPower public class SonarPulsePower : SupportPower
{ {
public SonarPulsePower(Actor self, SonarPulsePowerInfo info) : base(self, info) { } public SonarPulsePower(Actor self, SonarPulsePowerInfo info) : base(self, info) { }
public override void Activate(Actor self, Order order) public override void Activate(Actor self, Order order, SupportPowerManager manager)
{ {
base.Activate(self, order, manager);
// TODO: Reveal submarines // TODO: Reveal submarines
// Should this play for all players? // Should this play for all players?

View File

@@ -25,8 +25,10 @@ namespace OpenRA.Mods.RA
{ {
public SpyPlanePower(Actor self, SpyPlanePowerInfo info) : base(self, info) { } public SpyPlanePower(Actor self, SpyPlanePowerInfo info) : base(self, info) { }
public override void Activate(Actor self, Order order) public override void Activate(Actor self, Order order, SupportPowerManager manager)
{ {
base.Activate(self, order, manager);
var enterCell = self.World.ChooseRandomEdgeCell(); var enterCell = self.World.ChooseRandomEdgeCell();
var altitude = Rules.Info["u2"].Traits.Get<PlaneInfo>().CruiseAltitude; var altitude = Rules.Info["u2"].Traits.Get<PlaneInfo>().CruiseAltitude;

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information #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 * 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 * available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information, * as published by the Free Software Foundation. For more information,
@@ -8,6 +8,7 @@
*/ */
#endregion #endregion
using OpenRA.Mods.RA.Effects;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA
@@ -45,6 +46,7 @@ namespace OpenRA.Mods.RA
{ {
public readonly Actor self; public readonly Actor self;
public readonly SupportPowerInfo Info; public readonly SupportPowerInfo Info;
protected Beacon beacon;
public SupportPower(Actor self, SupportPowerInfo info) public SupportPower(Actor self, SupportPowerInfo info)
{ {
@@ -62,7 +64,26 @@ namespace OpenRA.Mods.RA
Sound.PlayToPlayer(self.Owner, Info.EndChargeSound); Sound.PlayToPlayer(self.Owner, Info.EndChargeSound);
} }
public virtual void Activate(Actor self, Order order) { } public virtual void Activate(Actor self, Order order, SupportPowerManager manager)
{
if (Info.DisplayBeacon)
{
beacon = new Beacon(
order.Player,
order.TargetLocation.CenterPosition,
Info.BeaconDuration,
Info.BeaconPalettePrefix);
self.World.Add(beacon);
}
if (Info.DisplayRadarPing && manager.RadarPings != null)
manager.RadarPings.Value.Add(
() => order.Player.IsAlliedWith(self.World.RenderPlayer),
order.TargetLocation.CenterPosition,
order.Player.Color.RGB,
Info.BeaconDuration);
}
public virtual IOrderGenerator OrderGenerator(string order, SupportPowerManager manager) public virtual IOrderGenerator OrderGenerator(string order, SupportPowerManager manager)
{ {

View File

@@ -188,24 +188,10 @@ namespace OpenRA.Mods.RA
var power = Instances.First(i => !InstanceDisabled(i)); var power = Instances.First(i => !InstanceDisabled(i));
// Note: order.Subject is the *player* actor // Note: order.Subject is the *player* actor
power.Activate(power.self, order); power.Activate(power.self, order, Manager);
RemainingTime = TotalTime; RemainingTime = TotalTime;
notifiedCharging = notifiedReady = false; notifiedCharging = notifiedReady = false;
if (power.Info.DisplayBeacon)
power.self.World.Add(new Beacon(
order.Player,
order.TargetLocation.CenterPosition,
power.Info.BeaconDuration,
power.Info.BeaconPalettePrefix));
if (power.Info.DisplayRadarPing && Manager.RadarPings != null)
Manager.RadarPings.Value.Add(
() => order.Player.IsAlliedWith(power.self.World.RenderPlayer),
order.TargetLocation.CenterPosition,
order.Player.Color.RGB,
power.Info.BeaconDuration);
if (Info.OneShot) if (Info.OneShot)
Disabled = true; Disabled = true;
} }

View File

@@ -143,6 +143,13 @@ namespace OpenRA.Utility
ConvertFloatToRange(ref node.Value.Value); ConvertFloatToRange(ref node.Value.Value);
} }
// Waypoint was renamed to Immobile
if (engineVersion < 20140312)
{
if (depth == 1 && node.Key == "Waypoint")
node.Key = "Immobile";
}
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1); UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
} }
} }

View File

@@ -385,6 +385,7 @@ HQ:
UnitType: a10 UnitType: a10
DisplayBeacon: True DisplayBeacon: True
DisplayRadarPing: True DisplayRadarPing: True
CameraActor: camera
SupportPowerChargeBar: SupportPowerChargeBar:
FIX: FIX:

View File

@@ -31,17 +31,17 @@ CRATE:
BodyOrientation: BodyOrientation:
mpspawn: mpspawn:
Waypoint: Immobile:
RenderEditorOnly: RenderEditorOnly:
BodyOrientation: BodyOrientation:
waypoint: waypoint:
Waypoint: Immobile:
RenderEditorOnly: RenderEditorOnly:
BodyOrientation: BodyOrientation:
CAMERA: CAMERA:
Aircraft: Immobile:
Health: Health:
HP: 1000 HP: 1000
RevealsShroud: RevealsShroud:

View File

@@ -59,7 +59,6 @@ PALACEA:
LongDesc: Ornithopter drops a load of parachuted\nbombs on your target LongDesc: Ornithopter drops a load of parachuted\nbombs on your target
UnitType: orni.bomber UnitType: orni.bomber
SelectTargetSound: SelectTargetSound:
FlareType:
CanPowerDown: CanPowerDown:
DisabledOverlay: DisabledOverlay:
RequiresPower: RequiresPower:

View File

@@ -88,7 +88,6 @@ PALACEO:
LongDesc: Ornithopter drops a load of parachuted\nbombs on your target LongDesc: Ornithopter drops a load of parachuted\nbombs on your target
UnitType: orni.bomber UnitType: orni.bomber
SelectTargetSound: SelectTargetSound:
FlareType:
CanPowerDown: CanPowerDown:
DisabledOverlay: DisabledOverlay:
RequiresPower: RequiresPower:

View File

@@ -85,12 +85,12 @@ CRATE:
BodyOrientation: BodyOrientation:
mpspawn: mpspawn:
Waypoint: Immobile:
RenderEditorOnly: RenderEditorOnly:
BodyOrientation: BodyOrientation:
waypoint: waypoint:
Waypoint: Immobile:
RenderEditorOnly: RenderEditorOnly:
BodyOrientation: BodyOrientation:

View File

@@ -119,7 +119,7 @@ CRATE:
BodyOrientation: BodyOrientation:
CAMERA: CAMERA:
Aircraft: Immobile:
Health: Health:
HP: 1000 HP: 1000
RevealsShroud: RevealsShroud:
@@ -129,7 +129,7 @@ CAMERA:
BodyOrientation: BodyOrientation:
FLARE: FLARE:
Aircraft: Immobile:
Health: Health:
HP: 1000 HP: 1000
RevealsShroud: RevealsShroud:
@@ -152,7 +152,7 @@ powerproxy.parabombs:
AllowMultiple: yes AllowMultiple: yes
UnitType: badr.bomber UnitType: badr.bomber
SelectTargetSound: slcttgt1.aud SelectTargetSound: slcttgt1.aud
FlareType: flare FlareActor: flare
powerproxy.sonarpulse: powerproxy.sonarpulse:
SonarPulsePower: SonarPulsePower:
@@ -165,12 +165,12 @@ powerproxy.sonarpulse:
SelectTargetSound: slcttgt1.aud SelectTargetSound: slcttgt1.aud
mpspawn: mpspawn:
Waypoint: Immobile:
RenderEditorOnly: RenderEditorOnly:
BodyOrientation: BodyOrientation:
waypoint: waypoint:
Waypoint: Immobile:
RenderEditorOnly: RenderEditorOnly:
BodyOrientation: BodyOrientation:

View File

@@ -1,10 +1,10 @@
mpspawn: mpspawn:
Waypoint: Immobile:
RenderEditorOnly: RenderEditorOnly:
BodyOrientation: BodyOrientation:
waypoint: waypoint:
Waypoint: Immobile:
RenderEditorOnly: RenderEditorOnly:
BodyOrientation: BodyOrientation: