generate random numbers as floats

as they get converted from double before use anyway
This commit is contained in:
Matthias Mailänder
2013-03-01 10:53:41 +01:00
parent 793dfa5748
commit 47075e1cd0
5 changed files with 5 additions and 5 deletions

View File

@@ -107,7 +107,7 @@ namespace OpenRA.Mods.RA
{
var info = self.Info.Traits.Get<AttackBaseInfo>();
nextScanTime = (int)(25 * (info.ScanTimeAverage +
(self.World.SharedRandom.NextDouble() * 2 - 1) * info.ScanTimeSpread));
(self.World.SharedRandom.NextFloat() * 2 - 1) * info.ScanTimeSpread));
var inRange = self.World.FindUnitsInCircle(self.CenterLocation, (int)(Game.CellSize * range));