Merge pull request #11912 from Mailaender/laser-transparency
Fixed transparency for LaserZap
This commit is contained in:
@@ -36,7 +36,7 @@ namespace OpenRA.Mods.Common.Projectiles
|
|||||||
|
|
||||||
public readonly bool UsePlayerColor = false;
|
public readonly bool UsePlayerColor = false;
|
||||||
|
|
||||||
[Desc("Laser color in (A,)R,G,B.")]
|
[Desc("Laser color.")]
|
||||||
public readonly Color Color = Color.Red;
|
public readonly Color Color = Color.Red;
|
||||||
|
|
||||||
[Desc("Impact animation.")]
|
[Desc("Impact animation.")]
|
||||||
@@ -106,7 +106,7 @@ namespace OpenRA.Mods.Common.Projectiles
|
|||||||
|
|
||||||
if (ticks < info.BeamDuration)
|
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);
|
yield return new BeamRenderable(args.Source, info.ZOffset, target - args.Source, info.Shape, info.Width, rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -195,6 +195,7 @@ TurretLaserFire:
|
|||||||
Width: 50
|
Width: 50
|
||||||
BeamDuration: 5
|
BeamDuration: 5
|
||||||
ZOffset: 2047
|
ZOffset: 2047
|
||||||
|
Color: FF000045
|
||||||
Warhead@1Dam: SpreadDamage
|
Warhead@1Dam: SpreadDamage
|
||||||
Spread: 42
|
Spread: 42
|
||||||
Damage: 30
|
Damage: 30
|
||||||
|
|||||||
Reference in New Issue
Block a user