Merge pull request #11912 from Mailaender/laser-transparency

Fixed transparency for LaserZap
This commit is contained in:
reaperrr
2016-09-08 19:14:37 +02:00
committed by GitHub
2 changed files with 3 additions and 2 deletions

View File

@@ -36,7 +36,7 @@ namespace OpenRA.Mods.Common.Projectiles
public readonly bool UsePlayerColor = false;
[Desc("Laser color in (A,)R,G,B.")]
[Desc("Laser color.")]
public readonly Color Color = Color.Red;
[Desc("Impact animation.")]
@@ -106,7 +106,7 @@ namespace OpenRA.Mods.Common.Projectiles
if (ticks < info.BeamDuration)
{
var rc = Color.FromArgb((info.BeamDuration - ticks) * 255 / info.BeamDuration, color);
var rc = Color.FromArgb((info.BeamDuration - ticks) * color.A / info.BeamDuration, color);
yield return new BeamRenderable(args.Source, info.ZOffset, target - args.Source, info.Shape, info.Width, rc);
}

View File

@@ -195,6 +195,7 @@ TurretLaserFire:
Width: 50
BeamDuration: 5
ZOffset: 2047
Color: FF000045
Warhead@1Dam: SpreadDamage
Spread: 42
Damage: 30