add smoke trails for damaged aircraft
This commit is contained in:
@@ -60,6 +60,7 @@
|
||||
<Compile Include="Activities\Demolish.cs" />
|
||||
<Compile Include="Activities\Enter.cs" />
|
||||
<Compile Include="Activities\EnterTransport.cs" />
|
||||
<Compile Include="SmokeTrailWhenDamaged.cs" />
|
||||
<Compile Include="Strategic\StrategicVictoryConditions.cs" />
|
||||
<Compile Include="Strategic\StrategicPoint.cs" />
|
||||
<Compile Include="ProximityCapturable.cs" />
|
||||
|
||||
31
OpenRA.Mods.RA/SmokeTrailWhenDamaged.cs
Normal file
31
OpenRA.Mods.RA/SmokeTrailWhenDamaged.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
|
||||
* 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
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see LICENSE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.Mods.RA.Effects;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
class SmokeTrailWhenDamagedInfo : TraitInfo<SmokeTrailWhenDamaged> { }
|
||||
|
||||
class SmokeTrailWhenDamaged : ITick
|
||||
{
|
||||
public void Tick(Actor self)
|
||||
{
|
||||
if (self.GetDamageState() >= DamageState.Heavy)
|
||||
self.World.AddFrameEndTask(
|
||||
w => { if (!self.Destroyed) w.Add(
|
||||
new Smoke(w, self.CenterLocation.ToInt2()
|
||||
- new int2(0, self.Trait<IMove>().Altitude),
|
||||
"smokey")); });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ BADR:
|
||||
ROT: 5
|
||||
Speed: 16
|
||||
RenderUnit:
|
||||
Smokes: no
|
||||
WithShadow:
|
||||
IronCurtainable:
|
||||
Cargo:
|
||||
@@ -27,6 +28,7 @@ BADR:
|
||||
Spins: no
|
||||
Moves: yes
|
||||
Explosion: UnitExplode
|
||||
SmokeTrailWhenDamaged:
|
||||
|
||||
BADR.bomber:
|
||||
CarpetBomb:
|
||||
@@ -44,6 +46,7 @@ BADR.bomber:
|
||||
Ammo: 7
|
||||
RenderUnit:
|
||||
Image: badr
|
||||
Smokes: no
|
||||
WithShadow:
|
||||
IronCurtainable:
|
||||
-Selectable:
|
||||
@@ -58,6 +61,7 @@ BADR.bomber:
|
||||
Spins: no
|
||||
Moves: yes
|
||||
Explosion: UnitExplode
|
||||
SmokeTrailWhenDamaged:
|
||||
|
||||
V2RL:
|
||||
Inherits: ^Vehicle
|
||||
@@ -717,6 +721,7 @@ MIG:
|
||||
Speed: 20
|
||||
RearmBuildings: afld
|
||||
RenderUnit:
|
||||
Smokes: no
|
||||
WithShadow:
|
||||
LimitedAmmo:
|
||||
Ammo: 8
|
||||
@@ -732,6 +737,7 @@ MIG:
|
||||
Spins: no
|
||||
Moves: yes
|
||||
Explosion: UnitExplode
|
||||
SmokeTrailWhenDamaged:
|
||||
|
||||
YAK:
|
||||
Inherits: ^Plane
|
||||
@@ -764,6 +770,7 @@ YAK:
|
||||
ROT: 5
|
||||
Speed: 16
|
||||
RenderUnit:
|
||||
Smokes: no
|
||||
WithShadow:
|
||||
LimitedAmmo:
|
||||
Ammo: 18
|
||||
@@ -777,6 +784,7 @@ YAK:
|
||||
Spins: no
|
||||
Moves: yes
|
||||
Explosion: UnitExplode
|
||||
SmokeTrailWhenDamaged:
|
||||
|
||||
TRAN:
|
||||
Inherits: ^Plane
|
||||
@@ -847,12 +855,14 @@ HELI:
|
||||
Speed: 16
|
||||
RenderUnitRotor:
|
||||
PrimaryOffset: 0,0,0,-2
|
||||
Smokes: no
|
||||
WithShadow:
|
||||
LimitedAmmo:
|
||||
Ammo: 6
|
||||
IronCurtainable:
|
||||
FallsToEarth:
|
||||
Explosion: UnitExplode
|
||||
SmokeTrailWhenDamaged:
|
||||
|
||||
HIND:
|
||||
Inherits: ^Plane
|
||||
@@ -886,6 +896,7 @@ HIND:
|
||||
ROT: 4
|
||||
Speed: 12
|
||||
RenderUnitRotor:
|
||||
Smokes: no
|
||||
WithShadow:
|
||||
LimitedAmmo:
|
||||
Ammo: 24
|
||||
@@ -896,6 +907,7 @@ HIND:
|
||||
WithMuzzleFlash:
|
||||
FallsToEarth:
|
||||
Explosion: UnitExplode
|
||||
SmokeTrailWhenDamaged:
|
||||
|
||||
U2:
|
||||
Inherits: ^Plane
|
||||
@@ -907,6 +919,7 @@ U2:
|
||||
ROT: 7
|
||||
Speed: 40
|
||||
RenderUnit:
|
||||
Smokes: no
|
||||
WithShadow:
|
||||
IronCurtainable:
|
||||
-Selectable:
|
||||
@@ -919,6 +932,7 @@ U2:
|
||||
Spins: no
|
||||
Moves: yes
|
||||
Explosion: UnitExplode
|
||||
SmokeTrailWhenDamaged:
|
||||
|
||||
1TNK.Husk:
|
||||
Inherits: ^Husk
|
||||
|
||||
Reference in New Issue
Block a user