From 3aaaa95618b251ba771e3d6fb898d6253dc0c1a8 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Fri, 23 Oct 2020 21:36:47 +0100 Subject: [PATCH] Apply range modifiers to Missile RangeLimit. --- OpenRA.Mods.Common/Projectiles/Missile.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Projectiles/Missile.cs b/OpenRA.Mods.Common/Projectiles/Missile.cs index 44993dc2fc..978968b665 100644 --- a/OpenRA.Mods.Common/Projectiles/Missile.cs +++ b/OpenRA.Mods.Common/Projectiles/Missile.cs @@ -223,7 +223,8 @@ namespace OpenRA.Mods.Common.Projectiles hFacing = args.Facing.Facing; gravity = new WVec(0, 0, -info.Gravity); targetPosition = args.PassiveTarget; - rangeLimit = info.RangeLimit != WDist.Zero ? info.RangeLimit : args.Weapon.Range; + var limit = info.RangeLimit != WDist.Zero ? info.RangeLimit : args.Weapon.Range; + rangeLimit = new WDist(Util.ApplyPercentageModifiers(limit.Length, args.RangeModifiers)); minLaunchSpeed = info.MinimumLaunchSpeed.Length > -1 ? info.MinimumLaunchSpeed.Length : info.Speed.Length; maxLaunchSpeed = info.MaximumLaunchSpeed.Length > -1 ? info.MaximumLaunchSpeed.Length : info.Speed.Length; maxSpeed = info.Speed.Length;