GravityBomb palette can now be customized the same way as for Bullets and Missiles.
Update CHANGELOG. Also mentioned Bullets and Missiles since it seems there wasn't an entry for that before.
This commit is contained in:
@@ -150,6 +150,7 @@ NEW:
|
||||
Added HitAnimPalette trait for LaserZap projectiles. Laser hit animations can now specify individual palettes. Defaults to effect palette.
|
||||
Added RenderNameTag trait to show the player's name above an actor.
|
||||
Added ExplosionPalette and WaterExplosionPalette traits to Warheads to allow custom explosion palettes. Defaults to effect palette.
|
||||
Bullet, Missile and GravityBomb projectiles can now define a custom palette (see RA Torpedo weapon for reference).
|
||||
Fixed performance issues with units pathing to naval transports.
|
||||
Fixed unit moving to transports that have moved.
|
||||
Updated shroud-based traits to use world units.
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace OpenRA.Mods.RA.Effects
|
||||
public class GravityBombInfo : IProjectileInfo
|
||||
{
|
||||
public readonly string Image = null;
|
||||
public readonly bool Shadow = false;
|
||||
public readonly WRange Velocity = WRange.Zero;
|
||||
public readonly WRange Acceleration = new WRange(15);
|
||||
|
||||
@@ -64,10 +65,19 @@ namespace OpenRA.Mods.RA.Effects
|
||||
public IEnumerable<IRenderable> Render(WorldRenderer wr)
|
||||
{
|
||||
var cell = pos.ToCPos();
|
||||
if (args.SourceActor.World.FogObscures(cell))
|
||||
return SpriteRenderable.None;
|
||||
if (!args.SourceActor.World.FogObscures(cell))
|
||||
{
|
||||
if (info.Shadow)
|
||||
{
|
||||
var shadowPos = pos - new WVec(0, 0, pos.Z);
|
||||
foreach (var r in anim.Render(shadowPos, wr.Palette("shadow")))
|
||||
yield return r;
|
||||
}
|
||||
|
||||
return anim.Render(pos, wr.Palette("effect"));
|
||||
var palette = wr.Palette(args.Weapon.Palette);
|
||||
foreach (var r in anim.Render(pos, palette))
|
||||
yield return r;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user