Fix the missle jamming chance calculation

This commit is contained in:
abcdefg30
2020-03-06 12:11:17 +01:00
committed by reaperrr
parent 3721dae74d
commit d2db0913ac

View File

@@ -428,7 +428,7 @@ namespace OpenRA.Mods.Common.Projectiles
if (!tp.Trait.DeflectionStances.HasStance(tp.Actor.Owner.Stances[args.SourceActor.Owner])) if (!tp.Trait.DeflectionStances.HasStance(tp.Actor.Owner.Stances[args.SourceActor.Owner]))
return false; 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) void ChangeSpeed(int sign = 1)