Merge pull request #5828 from reaperrr/missile-shadow

Re-implement Shadow support for Missiles
This commit is contained in:
Matthias Mailänder
2014-07-06 14:55:51 +02:00
6 changed files with 34 additions and 47 deletions

View File

@@ -26,6 +26,7 @@ namespace OpenRA.Mods.RA.Effects
public readonly int Arm = 0; public readonly int Arm = 0;
[Desc("Check for whether an actor with Wall: trait blocks fire")] [Desc("Check for whether an actor with Wall: trait blocks fire")]
public readonly bool High = false; public readonly bool High = false;
public readonly bool Shadow = false;
public readonly string Trail = null; public readonly string Trail = null;
[Desc("Maximum offset at the maximum range")] [Desc("Maximum offset at the maximum range")]
public readonly WRange Inaccuracy = WRange.Zero; public readonly WRange Inaccuracy = WRange.Zero;
@@ -188,6 +189,13 @@ namespace OpenRA.Mods.RA.Effects
if (!args.SourceActor.World.FogObscures(wr.world.Map.CellContaining(pos))) if (!args.SourceActor.World.FogObscures(wr.world.Map.CellContaining(pos)))
{ {
if (info.Shadow)
{
var shadowPos = new WPos(pos.X, pos.Y, 0);
foreach (var r in anim.Render(shadowPos, wr.Palette("shadow")))
yield return r;
}
var palette = wr.Palette(args.Weapon.Palette); var palette = wr.Palette(args.Weapon.Palette);
foreach (var r in anim.Render(pos, palette)) foreach (var r in anim.Render(pos, palette))
yield return r; yield return r;

View File

@@ -243,7 +243,6 @@ Rockets:
Projectile: Missile Projectile: Missile
Arm: 0 Arm: 0
High: yes High: yes
Shadow: no
Inaccuracy: 128 Inaccuracy: 128
Image: DRAGON Image: DRAGON
ROT: 15 ROT: 15
@@ -275,7 +274,6 @@ BikeRockets:
Projectile: Missile Projectile: Missile
Arm: 0 Arm: 0
High: yes High: yes
Shadow: no
Inaccuracy: 128 Inaccuracy: 128
Image: DRAGON Image: DRAGON
ROT: 10 ROT: 10
@@ -307,7 +305,6 @@ OrcaAGMissiles:
Projectile: Missile Projectile: Missile
Arm: 0 Arm: 0
High: yes High: yes
Shadow: no
Inaccuracy: 128 Inaccuracy: 128
Image: DRAGON Image: DRAGON
ROT: 20 ROT: 20
@@ -338,7 +335,6 @@ OrcaAAMissiles:
Projectile: Missile Projectile: Missile
Arm: 0 Arm: 0
High: yes High: yes
Shadow: no
Inaccuracy: 128 Inaccuracy: 128
Image: DRAGON Image: DRAGON
ROT: 20 ROT: 20
@@ -556,7 +552,6 @@ MammothMissiles:
Projectile: Missile Projectile: Missile
Arm: 0 Arm: 0
High: yes High: yes
Shadow: no
Inaccuracy: 128 Inaccuracy: 128
Image: DRAGON Image: DRAGON
ROT: 20 ROT: 20
@@ -588,7 +583,7 @@ MammothMissiles:
Projectile: Bullet Projectile: Bullet
Arm: 5 Arm: 5
High: yes High: yes
Shadow: yes Shadow: true
Inaccuracy: 853 Inaccuracy: 853
Angle: 62 Angle: 62
Image: DRAGON Image: DRAGON
@@ -619,7 +614,6 @@ MammothMissiles:
Projectile: Missile Projectile: Missile
Arm: 0 Arm: 0
High: yes High: yes
Shadow: yes
Inaccuracy: 213 Inaccuracy: 213
Image: DRAGON Image: DRAGON
ROT: 10 ROT: 10
@@ -694,7 +688,6 @@ BoatMissile:
Projectile: Missile Projectile: Missile
Arm: 0 Arm: 0
High: yes High: yes
Shadow: no
Inaccuracy: 213 Inaccuracy: 213
Image: DRAGON Image: DRAGON
ROT: 10 ROT: 10
@@ -723,7 +716,6 @@ TowerMissle:
Projectile: Missile Projectile: Missile
Arm: 0 Arm: 0
High: yes High: yes
Shadow: no
Inaccuracy: 128 Inaccuracy: 128
Image: DRAGON Image: DRAGON
ROT: 20 ROT: 20
@@ -822,7 +814,6 @@ SAMMissile:
Projectile: Missile Projectile: Missile
Arm: 0 Arm: 0
High: yes High: yes
Shadow: no
Image: MISSILE Image: MISSILE
ROT: 20 ROT: 20
Speed: 426 Speed: 426
@@ -849,7 +840,7 @@ HonestJohn:
Projectile: Bullet Projectile: Bullet
Arm: 10 Arm: 10
High: yes High: yes
Shadow: yes Shadow: true
Inaccuracy: 213 Inaccuracy: 213
Image: patriot Image: patriot
Trail: smokey Trail: smokey
@@ -941,7 +932,6 @@ Patriot:
ValidTargets: Air ValidTargets: Air
Projectile: Missile Projectile: Missile
High: yes High: yes
Shadow: no
Image: patriot Image: patriot
Trail: smokey Trail: smokey
ContrailLength: 8 ContrailLength: 8

View File

@@ -27,7 +27,6 @@ Bazooka:
Projectile: Missile Projectile: Missile
Speed: 160 Speed: 160
Arm: 2 Arm: 2
Shadow: yes
ContrailLength: 10 ContrailLength: 10
Inaccuracy: 96 Inaccuracy: 96
Image: RPG Image: RPG
@@ -171,7 +170,6 @@ QuadRockets:
ValidTargets: Ground, Air ValidTargets: Ground, Air
Projectile: Missile Projectile: Missile
Arm: 0 Arm: 0
Shadow: yes
Inaccuracy: 96 Inaccuracy: 96
Image: RPG Image: RPG
ROT: 10 ROT: 10

View File

@@ -127,7 +127,6 @@ Maverick:
Speed: 256 Speed: 256
Arm: 2 Arm: 2
High: true High: true
Shadow: false
ContrailLength: 10 ContrailLength: 10
Inaccuracy: 512 Inaccuracy: 512
Image: DRAGON Image: DRAGON
@@ -284,7 +283,6 @@ Dragon:
Speed: 213 Speed: 213
Arm: 2 Arm: 2
High: true High: true
Shadow: false
Trail: smokey Trail: smokey
ContrailLength: 10 ContrailLength: 10
Inaccuracy: 128 Inaccuracy: 128
@@ -317,7 +315,6 @@ HellfireAG:
Speed: 256 Speed: 256
Arm: 2 Arm: 2
High: true High: true
Shadow: false
ContrailLength: 10 ContrailLength: 10
Inaccuracy: 128 Inaccuracy: 128
Image: DRAGON Image: DRAGON
@@ -349,7 +346,6 @@ HellfireAA:
Speed: 384 Speed: 384
Arm: 2 Arm: 2
High: true High: true
Shadow: false
ContrailLength: 10 ContrailLength: 10
Inaccuracy: 128 Inaccuracy: 128
Image: DRAGON Image: DRAGON
@@ -516,7 +512,6 @@ MammothTusk:
Speed: 341 Speed: 341
Arm: 2 Arm: 2
High: true High: true
Shadow: false
ContrailLength: 10 ContrailLength: 10
Inaccuracy: 128 Inaccuracy: 128
Image: DRAGON Image: DRAGON
@@ -686,7 +681,6 @@ Nike:
Projectile: Missile Projectile: Missile
Arm: 3 Arm: 3
High: true High: true
Shadow: false
ContrailLength: 10 ContrailLength: 10
Image: MISSILE Image: MISSILE
ROT: 25 ROT: 25
@@ -714,7 +708,6 @@ RedEye:
Projectile: Missile Projectile: Missile
Arm: 3 Arm: 3
High: true High: true
Shadow: false
ContrailLength: 10 ContrailLength: 10
Image: MISSILE Image: MISSILE
ROT: 20 ROT: 20
@@ -797,7 +790,6 @@ Stinger:
Projectile: Missile Projectile: Missile
Arm: 3 Arm: 3
High: true High: true
Shadow: false
ContrailLength: 10 ContrailLength: 10
Image: DRAGON Image: DRAGON
ROT: 20 ROT: 20
@@ -1285,7 +1277,6 @@ APTusk:
Speed: 298 Speed: 298
Arm: 2 Arm: 2
High: true High: true
Shadow: false
Trail: smokey Trail: smokey
ContrailLength: 10 ContrailLength: 10
Inaccuracy: 128 Inaccuracy: 128

View File

@@ -127,9 +127,10 @@ HVR:
Range: 7c0 Range: 7c0
Armament: Armament:
Weapon: HoverMissile Weapon: HoverMissile
LocalOffset: 0,171,384, 0,-171,384
Turreted: Turreted:
ROT: 7 ROT: 7
Offset: -128,0,0 Offset: -128,0,85
AttackTurreted: AttackTurreted:
AutoTarget: AutoTarget:
RenderSprites: RenderSprites:
@@ -605,8 +606,7 @@ BIKE:
Range: 5c0 Range: 5c0
Armament: Armament:
Weapon: BikeMissile Weapon: BikeMissile
LocalOffset: -128, -170, 170, -128, 170, 170 LocalOffset: -128,-170,213, -128,170,213
LocalYaw: 100, -100
AttackFrontal: AttackFrontal:
AutoTarget: AutoTarget:
RenderSprites: RenderSprites:

View File

@@ -47,7 +47,7 @@ Grenade:
Projectile: Bullet Projectile: Bullet
Speed: 85 Speed: 85
High: yes High: yes
Shadow: yes Shadow: true
Angle: 62 Angle: 62
Inaccuracy: 554 Inaccuracy: 554
Image: DISCUS Image: DISCUS
@@ -74,7 +74,7 @@ Bazooka:
Speed: 213 Speed: 213
Arm: 2 Arm: 2
High: yes High: yes
Shadow: yes Shadow: true
Inaccuracy: 128 Inaccuracy: 128
Image: DRAGON Image: DRAGON
ROT: 8 ROT: 8
@@ -102,7 +102,7 @@ MultiCluster:
Speed: 170 Speed: 170
Arm: 2 Arm: 2
High: yes High: yes
Shadow: yes Shadow: true
Inaccuracy: 128 Inaccuracy: 128
Image: DRAGON Image: DRAGON
ROT: 8 ROT: 8
@@ -198,7 +198,7 @@ CyCannon:
Projectile: Bullet Projectile: Bullet
Speed: 192 Speed: 192
High: yes High: yes
Shadow: yes Shadow: true
Image: TORPEDO Image: TORPEDO
Warhead: Warhead:
Spread: 256 Spread: 256
@@ -275,7 +275,7 @@ FiendShard:
Projectile: Bullet Projectile: Bullet
Speed: 213 Speed: 213
Image: CRYSTAL4 Image: CRYSTAL4
Shadow: yes Shadow: true
Angle: 88 Angle: 88
Warhead: Warhead:
Versus: Versus:
@@ -312,10 +312,10 @@ HoverMissile:
ValidTargets: Ground, Air ValidTargets: Ground, Air
Palette: ra Palette: ra
Projectile: Missile Projectile: Missile
Speed: 256 Speed: 213
Arm: 2 Arm: 2
High: yes High: yes
Shadow: yes Shadow: true
Inaccuracy: 128 Inaccuracy: 128
Image: DRAGON Image: DRAGON
ROT: 8 ROT: 8
@@ -343,7 +343,7 @@ HoverMissile:
Projectile: Bullet Projectile: Bullet
Speed: 682 Speed: 682
Image: 120mm Image: 120mm
Shadow: yes Shadow: true
Angle: 62 Angle: 62
Warhead: Warhead:
Spread: 128 Spread: 128
@@ -368,7 +368,7 @@ MammothTusk:
Projectile: Missile Projectile: Missile
Arm: 0 Arm: 0
High: yes High: yes
Shadow: yes Shadow: true
Inaccuracy: 128 Inaccuracy: 128
Image: DRAGON Image: DRAGON
ROT: 10 ROT: 10
@@ -502,11 +502,11 @@ BikeMissile:
Projectile: Missile Projectile: Missile
Arm: 2 Arm: 2
High: yes High: yes
Shadow: yes Shadow: true
Inaccuracy: 128 Inaccuracy: 128
Image: DRAGON Image: DRAGON
ROT: 8 ROT: 8
Speed: 256 Speed: 213
RangeLimit: 35 RangeLimit: 35
Warhead: Warhead:
Spread: 256 Spread: 256
@@ -589,7 +589,7 @@ Dragon:
Speed: 213 Speed: 213
Arm: 2 Arm: 2
High: yes High: yes
Shadow: yes Shadow: true
Inaccuracy: 128 Inaccuracy: 128
Image: DRAGON Image: DRAGON
ROT: 8 ROT: 8
@@ -615,7 +615,7 @@ Dragon:
Projectile: Bullet Projectile: Bullet
Speed: 682 Speed: 682
Image: 120mm Image: 120mm
Shadow: yes Shadow: true
Angle: 62 Angle: 62
Warhead: Warhead:
Spread: 128 Spread: 128
@@ -639,7 +639,7 @@ Dragon:
Speed: 170 Speed: 170
Image: 120mm Image: 120mm
Angle: 165 Angle: 165
Shadow: yes Shadow: true
High: yes High: yes
MinRange: 5c0 MinRange: 5c0
Warhead: Warhead:
@@ -666,7 +666,7 @@ Hellfire:
Speed: 256 Speed: 256
Arm: 2 Arm: 2
High: yes High: yes
Shadow: yes Shadow: true
Inaccuracy: 128 Inaccuracy: 128
Image: DRAGON Image: DRAGON
ROT: 8 ROT: 8
@@ -691,7 +691,7 @@ Bomb:
Projectile: Bullet Projectile: Bullet
Speed: 170 Speed: 170
Image: canister Image: canister
Shadow: yes Shadow: true
Warhead: Warhead:
Spread: 298 Spread: 298
Versus: Versus:
@@ -715,7 +715,7 @@ Proton:
Speed: 256 Speed: 256
Arm: 2 Arm: 2
High: yes High: yes
Shadow: yes Shadow: true
Inaccuracy: 128 Inaccuracy: 128
Image: TORPEDO Image: TORPEDO
ROT: 1 ROT: 1
@@ -815,10 +815,10 @@ RPGTower:
Palette: player Palette: player
Projectile: Bullet Projectile: Bullet
Speed: 384 Speed: 384
Image: canister
Shadow: yes
Angle: 62
High: yes High: yes
Shadow: true
Angle: 62
Image: canister
Warhead: Warhead:
Spread: 128 Spread: 128
Versus: Versus:
@@ -842,7 +842,7 @@ SAMTower:
Speed: 298 Speed: 298
Arm: 2 Arm: 2
High: yes High: yes
Shadow: yes Shadow: true
Inaccuracy: 128 Inaccuracy: 128
Image: DRAGON Image: DRAGON
ROT: 5 ROT: 5