Merge pull request #5137 from reaperrr/gravitybomb-palette
Made GravityBomb palette customizable
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 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 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.
|
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 performance issues with units pathing to naval transports.
|
||||||
Fixed unit moving to transports that have moved.
|
Fixed unit moving to transports that have moved.
|
||||||
Updated shroud-based traits to use world units.
|
Updated shroud-based traits to use world units.
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ namespace OpenRA.Mods.RA.Effects
|
|||||||
public class GravityBombInfo : IProjectileInfo
|
public class GravityBombInfo : IProjectileInfo
|
||||||
{
|
{
|
||||||
public readonly string Image = null;
|
public readonly string Image = null;
|
||||||
|
public readonly bool Shadow = false;
|
||||||
public readonly WRange Velocity = WRange.Zero;
|
public readonly WRange Velocity = WRange.Zero;
|
||||||
public readonly WRange Acceleration = new WRange(15);
|
public readonly WRange Acceleration = new WRange(15);
|
||||||
|
|
||||||
@@ -64,10 +65,19 @@ namespace OpenRA.Mods.RA.Effects
|
|||||||
public IEnumerable<IRenderable> Render(WorldRenderer wr)
|
public IEnumerable<IRenderable> Render(WorldRenderer wr)
|
||||||
{
|
{
|
||||||
var cell = pos.ToCPos();
|
var cell = pos.ToCPos();
|
||||||
if (args.SourceActor.World.FogObscures(cell))
|
if (!args.SourceActor.World.FogObscures(cell))
|
||||||
return SpriteRenderable.None;
|
{
|
||||||
|
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