diff --git a/OpenRA.Mods.Common/Traits/Render/WithParachute.cs b/OpenRA.Mods.Common/Traits/Render/WithParachute.cs index 0372e6b727..8a8acfd1d7 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithParachute.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithParachute.cs @@ -44,7 +44,7 @@ namespace OpenRA.Mods.Common.Traits [SequenceReference("ShadowImage")] public readonly string ShadowSequence = null; [Desc("Palette used to render the paradropped unit's shadow.")] - public readonly string ShadowPalette = "player"; + public readonly string ShadowPalette = "shadow"; [Desc("Shadow position relative to the paradropped unit's intended landing position.")] public readonly WVec ShadowOffset = new WVec(0, 128, 0); diff --git a/mods/ra/maps/allies-03a/allies03a.lua b/mods/ra/maps/allies-03a/allies03a.lua index 6445ac8a13..fa9edad3e9 100644 --- a/mods/ra/maps/allies-03a/allies03a.lua +++ b/mods/ra/maps/allies-03a/allies03a.lua @@ -16,7 +16,13 @@ else ChangeStance = true end -IdleHunt = function(actor) Trigger.OnIdle(actor, actor.Hunt) end +IdleHunt = function(actor) + Trigger.OnIdle(actor, function(a) + if a.IsInWorld then + a.Hunt() + end + end) +end ProduceUnits = function(factory, count) if ussr.IsProducing("e1") then diff --git a/mods/ra/maps/allies-03b/allies03b.lua b/mods/ra/maps/allies-03b/allies03b.lua index 6067316ad4..ceea0b2135 100644 --- a/mods/ra/maps/allies-03b/allies03b.lua +++ b/mods/ra/maps/allies-03b/allies03b.lua @@ -27,7 +27,13 @@ else ChangeStance = true end -IdleHunt = function(actor) Trigger.OnIdle(actor, actor.Hunt) end +IdleHunt = function(actor) + Trigger.OnIdle(actor, function(a) + if a.IsInWorld then + a.Hunt() + end + end) +end Tick = function() if TeleportJeepCamera and Jeep.IsInWorld then diff --git a/mods/ra/maps/desert-shellmap/desert-shellmap.lua b/mods/ra/maps/desert-shellmap/desert-shellmap.lua index 34efded0f9..41f612277f 100644 --- a/mods/ra/maps/desert-shellmap/desert-shellmap.lua +++ b/mods/ra/maps/desert-shellmap/desert-shellmap.lua @@ -36,9 +36,17 @@ ParadropWaypoints = { Paradrop1, Paradrop2, Paradrop3, Paradrop4, Paradrop5, Par BindActorTriggers = function(a) if a.HasProperty("Hunt") then if a.Owner == allies then - Trigger.OnIdle(a, a.Hunt) + Trigger.OnIdle(a, function(a) + if a.IsInWorld then + a.Hunt() + end + end) else - Trigger.OnIdle(a, function(a) a.AttackMove(AlliedTechnologyCenter.Location) end) + Trigger.OnIdle(a, function(a) + if a.IsInWorld then + a.AttackMove(AlliedTechnologyCenter.Location) + end + end) end end diff --git a/mods/ra/maps/intervention/intervention.lua b/mods/ra/maps/intervention/intervention.lua index 34257899eb..a4030baddc 100644 --- a/mods/ra/maps/intervention/intervention.lua +++ b/mods/ra/maps/intervention/intervention.lua @@ -60,7 +60,11 @@ ParadropSovietUnits = function() local units = powerproxy.SendParatroopers(MCVDeployLocation.CenterPosition, false, 256 - 53) Utils.Do(units, function(a) - Trigger.OnIdle(a, a.Hunt) + Trigger.OnIdle(a, function(actor) + if actor.IsInWorld then + actor.Hunt() + end + end) end) powerproxy.Destroy() diff --git a/mods/ra/maps/survival01/map.yaml b/mods/ra/maps/survival01/map.yaml index aad84f5e78..de9d7e1d10 100644 --- a/mods/ra/maps/survival01/map.yaml +++ b/mods/ra/maps/survival01/map.yaml @@ -1252,6 +1252,10 @@ Rules: powerproxy.paratroopers: ParatroopersPower: DropItems: E1,E1,E1,E2,E2 + powerproxy.allied: + Inherits: powerproxy.paratroopers + ParatroopersPower: + DropItems: ARTY,ARTY,ARTY CAMERA.sam: Inherits: CAMERA RevealsShroud: @@ -1261,12 +1265,6 @@ Rules: RevealsShroud: Range: 1000 ARTY: - Parachutable: - KilledOnImpassableTerrain: false - WithParachute: - UpgradeTypes: parachute - UpgradeMinEnabledLevel: 1 - Image: parach UpgradeManager: BodyOrientation: AFLD.mission: diff --git a/mods/ra/maps/survival01/survival01.lua b/mods/ra/maps/survival01/survival01.lua index c962fd7291..9c4cf41b0f 100644 --- a/mods/ra/maps/survival01/survival01.lua +++ b/mods/ra/maps/survival01/survival01.lua @@ -28,7 +28,6 @@ else --Difficulty == "Hard" LongBowReinforcements = { "heli" } end -AlliedArtilleryParadrops = { "arty", "arty", "arty" } AlliedAirReinforcementsWaypoints = { { AirReinforcementsEntry1.Location, AirReinforcementsEntry2.Location }, @@ -186,7 +185,11 @@ SendSovietParadrops = function(table) local units = powerproxy.SendParatroopers(table[2].CenterPosition, false, table[1]) Utils.Do(units, function(unit) - Trigger.OnIdle(unit, unit.Hunt) + Trigger.OnIdle(unit, function(a) + if a.IsInWorld then + a.Hunt() + end + end) end) end @@ -279,21 +282,20 @@ TimerExpired = function() end end -DropAlliedArtillery = function(table) - local plane = Actor.Create("badr", true, { Owner = allies, Location = table[1] }) - Utils.Do(AlliedArtilleryParadrops, function(type) - local unit = Actor.Create(type, false, { Owner = allies }) - plane.LoadPassenger(unit) - end) - plane.Paradrop(table[2]) +DropAlliedArtillery = function(facing, dropzone) + local proxy = Actor.Create("powerproxy.allied", true, { Owner = allies }) + proxy.SendParatroopers(dropzone, false, facing) + proxy.Destroy() end SendLongBowReinforcements = function() Media.PlaySpeechNotification(allies, "AlliedReinforcementsArrived") Reinforcements.Reinforce(allies, LongBowReinforcements, AlliedAirReinforcementsWaypoints[1]) Reinforcements.Reinforce(allies, LongBowReinforcements, AlliedAirReinforcementsWaypoints[2]) + if ParadropArtillery then - DropAlliedArtillery({ Utils.Random(AlliedAirReinforcementsWaypoints)[1], Alliesbase.Location }) + local facing = Utils.RandomInteger(Facing.NorthWest, Facing.SouthWest) + DropAlliedArtillery(facing, Alliesbase.CenterPosition) end end diff --git a/mods/ra/maps/survival02/survival02.lua b/mods/ra/maps/survival02/survival02.lua index c196631e48..1eb612cea8 100644 --- a/mods/ra/maps/survival02/survival02.lua +++ b/mods/ra/maps/survival02/survival02.lua @@ -35,7 +35,13 @@ ParaWaves = { AttackTicks * 3, { "SovietSquad", SovietParaDrop1 } } } -IdleHunt = function(unit) Trigger.OnIdle(unit, unit.Hunt) end +IdleHunt = function(unit) + Trigger.OnIdle(unit, function(a) + if a.IsInWorld then + a.Hunt() + end + end) +end GuardHarvester = function(unit, harvester) if not unit.IsDead then diff --git a/mods/ra/rules/defaults.yaml b/mods/ra/rules/defaults.yaml index 8eabc89f7a..be7b4c1471 100644 --- a/mods/ra/rules/defaults.yaml +++ b/mods/ra/rules/defaults.yaml @@ -128,7 +128,11 @@ WithParachute: UpgradeTypes: parachute UpgradeMinEnabledLevel: 1 + ShadowImage: parach-shadow + ShadowSequence: idle Image: parach + Sequence: idle + OpeningSequence: open Offset: 0,0,200 ^Tank: