From d2db0913ac17c456185eb6e3a26e8f71ffa7f9ae Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Fri, 6 Mar 2020 12:11:17 +0100 Subject: [PATCH] Fix the missle jamming chance calculation --- OpenRA.Mods.Common/Projectiles/Missile.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Projectiles/Missile.cs b/OpenRA.Mods.Common/Projectiles/Missile.cs index 2b27a48d3d..6bb4fadd41 100644 --- a/OpenRA.Mods.Common/Projectiles/Missile.cs +++ b/OpenRA.Mods.Common/Projectiles/Missile.cs @@ -428,7 +428,7 @@ namespace OpenRA.Mods.Common.Projectiles if (!tp.Trait.DeflectionStances.HasStance(tp.Actor.Owner.Stances[args.SourceActor.Owner])) return false; - return tp.Actor.World.SharedRandom.Next(100 / tp.Trait.Chance) == 0; + return tp.Actor.World.SharedRandom.Next(100) < tp.Trait.Chance; } void ChangeSpeed(int sign = 1)