From ef6da3d0b3e4b079c9d44b24d86e35168a091c7c Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Sat, 18 Jul 2015 13:26:09 +0200 Subject: [PATCH 1/4] Replace the default value of ShadowPalette with "shadow". --- OpenRA.Mods.Common/Traits/Render/WithParachute.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); From df02604a9a75101ac3e3e07bf6addf295b13646d Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Sat, 18 Jul 2015 13:32:41 +0200 Subject: [PATCH 2/4] Fix WithParachute on ^Vehicle --- mods/ra/rules/defaults.yaml | 4 ++++ 1 file changed, 4 insertions(+) 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: From 3e7134ae6b0a903a7ce10a2cd873de0ff3705d70 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Sat, 18 Jul 2015 13:45:48 +0200 Subject: [PATCH 3/4] Fix bogus paradropping in survival01 --- mods/ra/maps/survival01/map.yaml | 10 ++++------ mods/ra/maps/survival01/survival01.lua | 16 +++++++--------- 2 files changed, 11 insertions(+), 15 deletions(-) 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..e4229fcf47 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 }, @@ -279,21 +278,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 From d5c65b59b0e32a3818ef4708a6dc84dcc37d7599 Mon Sep 17 00:00:00 2001 From: Oliver Brakmann Date: Sat, 18 Jul 2015 21:13:33 +0200 Subject: [PATCH 4/4] Fix scripted paradrops A recent PR changed ParaDrop from an Effect to an Activity. Idle triggers in the mission scripts however have already queued activities for the paradropped units, so the ParaDrop activity would only run once the first activity had finished (which could never happen). --- mods/ra/maps/allies-03a/allies03a.lua | 8 +++++++- mods/ra/maps/allies-03b/allies03b.lua | 8 +++++++- mods/ra/maps/desert-shellmap/desert-shellmap.lua | 12 ++++++++++-- mods/ra/maps/intervention/intervention.lua | 6 +++++- mods/ra/maps/survival01/survival01.lua | 6 +++++- mods/ra/maps/survival02/survival02.lua | 8 +++++++- 6 files changed, 41 insertions(+), 7 deletions(-) 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/survival01.lua b/mods/ra/maps/survival01/survival01.lua index e4229fcf47..9c4cf41b0f 100644 --- a/mods/ra/maps/survival01/survival01.lua +++ b/mods/ra/maps/survival01/survival01.lua @@ -185,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 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