From 2bc38fd751dfaa882eabb276fc2864ec8bfc26f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sun, 21 Apr 2013 08:38:52 +0200 Subject: [PATCH 1/2] don't hard-code smokey.shp --- OpenRA.Mods.RA/SmokeTrailWhenDamaged.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.RA/SmokeTrailWhenDamaged.cs b/OpenRA.Mods.RA/SmokeTrailWhenDamaged.cs index a6d9ac9668..ff4d3972d5 100644 --- a/OpenRA.Mods.RA/SmokeTrailWhenDamaged.cs +++ b/OpenRA.Mods.RA/SmokeTrailWhenDamaged.cs @@ -19,6 +19,7 @@ namespace OpenRA.Mods.RA [Desc("Position relative to body")] public readonly WVec Offset = WVec.Zero; public readonly int Interval = 3; + public readonly string Sprite = "smokey"; public object Create(ActorInitializer init) { return new SmokeTrailWhenDamaged(init.self, this); } } @@ -45,7 +46,7 @@ namespace OpenRA.Mods.RA { var offset = info.Offset.Rotate(coords.QuantizeOrientation(self, self.Orientation)); var pos = PPos.FromWPosHackZ(position + coords.LocalToWorld(offset)); - self.World.AddFrameEndTask(w => w.Add(new Smoke(w, pos, "smokey"))); + self.World.AddFrameEndTask(w => w.Add(new Smoke(w, pos, info.Sprite))); } ticks = info.Interval; From 322d010076eaed8ee92e50b83f2f9c51a10a5dd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sun, 21 Apr 2013 08:42:13 +0200 Subject: [PATCH 2/2] fix crash in d2k - the smoke sprite is currently undefined it used an RA one before, was hidden in the source code --- mods/d2k/rules/aircraft.yaml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/mods/d2k/rules/aircraft.yaml b/mods/d2k/rules/aircraft.yaml index 5c79c341fa..fbc47f7fd2 100644 --- a/mods/d2k/rules/aircraft.yaml +++ b/mods/d2k/rules/aircraft.yaml @@ -20,12 +20,6 @@ RepairBuildings: repair RearmBuildings: starporta,starporto,starporth MinimalLandAltitude: 25 - SmokeTrailWhenDamaged@0: - Offset: -512,640,0 - Interval: 3 - SmokeTrailWhenDamaged@1: - Offset: -512,-640,0 - Interval: 3 RenderUnit: RenderCargo: RelativeAltitude: 20 @@ -102,8 +96,6 @@ ORNI: Spins: no Moves: yes Explosion: UnitExplodeScale - SmokeTrailWhenDamaged: - Offset: -427,0,0 ORNI.bomber: CarpetBomb: @@ -134,8 +126,6 @@ ORNI.bomber: Spins: no Moves: yes Explosion: UnitExplodeScale - SmokeTrailWhenDamaged: - Offset: -427,0,0 CARRYALL.infantry: ParaDrop: @@ -153,12 +143,6 @@ CARRYALL.infantry: Speed: 40 RepairBuildings: repair RearmBuildings: starporta,starporto,starporth - SmokeTrailWhenDamaged@0: - Offset: -512,540,0 - Interval: 3 - SmokeTrailWhenDamaged@1: - Offset: -512,-640,0 - Interval: 3 RenderUnit: Image: carryall WithShadow: