Merge pull request #3136 from Mailaender/smokey

Don't crash d2k when shooting at aircraft and don't hard-code the sprite in smoke trails.
This commit is contained in:
Chris Forbes
2013-04-21 00:23:15 -07:00
2 changed files with 2 additions and 17 deletions

View File

@@ -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;

View File

@@ -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: