From c096934db8fed4f058a93564d3bb87d737bacbaf Mon Sep 17 00:00:00 2001 From: Mustafa Alperen Seki Date: Wed, 2 Feb 2022 20:31:56 +0300 Subject: [PATCH] Fix projectile shadow alpha calculation. --- OpenRA.Mods.Common/Projectiles/Bullet.cs | 2 +- OpenRA.Mods.Common/Projectiles/GravityBomb.cs | 2 +- OpenRA.Mods.Common/Projectiles/Missile.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OpenRA.Mods.Common/Projectiles/Bullet.cs b/OpenRA.Mods.Common/Projectiles/Bullet.cs index 1d7b1d5f50..ba7be41ef2 100644 --- a/OpenRA.Mods.Common/Projectiles/Bullet.cs +++ b/OpenRA.Mods.Common/Projectiles/Bullet.cs @@ -185,7 +185,7 @@ namespace OpenRA.Mods.Common.Projectiles remainingBounces = info.BounceCount; shadowColor = new float3(info.ShadowColor.R, info.ShadowColor.G, info.ShadowColor.B) / 255f; - shadowAlpha = info.ShadowColor.A; + shadowAlpha = info.ShadowColor.A / 255f; } WAngle GetEffectiveFacing() diff --git a/OpenRA.Mods.Common/Projectiles/GravityBomb.cs b/OpenRA.Mods.Common/Projectiles/GravityBomb.cs index dc7044121e..14026c49f8 100644 --- a/OpenRA.Mods.Common/Projectiles/GravityBomb.cs +++ b/OpenRA.Mods.Common/Projectiles/GravityBomb.cs @@ -86,7 +86,7 @@ namespace OpenRA.Mods.Common.Projectiles } shadowColor = new float3(info.ShadowColor.R, info.ShadowColor.G, info.ShadowColor.B) / 255f; - shadowAlpha = info.ShadowColor.A; + shadowAlpha = info.ShadowColor.A / 255f; } public void Tick(World world) diff --git a/OpenRA.Mods.Common/Projectiles/Missile.cs b/OpenRA.Mods.Common/Projectiles/Missile.cs index d094431f61..5ab2a22ed9 100644 --- a/OpenRA.Mods.Common/Projectiles/Missile.cs +++ b/OpenRA.Mods.Common/Projectiles/Missile.cs @@ -272,7 +272,7 @@ namespace OpenRA.Mods.Common.Projectiles trailPalette += args.SourceActor.Owner.InternalName; shadowColor = new float3(info.ShadowColor.R, info.ShadowColor.G, info.ShadowColor.B) / 255f; - shadowAlpha = info.ShadowColor.A; + shadowAlpha = info.ShadowColor.A / 255f; } static int LoopRadius(int speed, int rot)