# HG changeset patch # User unc0rr # Date 1156686450 0 # Node ID 19e3c16fb9f00f8047238ea41e58c4cad3c2f32a # Parent 313f3d0ee7fa303e76a4278ab7c767c72ba9796c Fix engine PRNG (accidentally deleted a line) diff -r 313f3d0ee7fa -r 19e3c16fb9f0 hedgewars/uRandom.pas --- a/hedgewars/uRandom.pas Sun Aug 27 13:38:05 2006 +0000 +++ b/hedgewars/uRandom.pas Sun Aug 27 13:47:30 2006 +0000 @@ -40,7 +40,6 @@ function GetRandom(m: LongWord): LongWord; overload; implementation -uses uMisc; var cirbuf: array[0..63] of Longword; n: byte = 54; @@ -51,7 +50,6 @@ (cirbuf[(n + 40) and $3F] + {n - 24 mod 64} cirbuf[(n + 9) and $3F]) {n - 55 mod 64} and $7FFFFFFF; {mod 2^31} - Result:= cirbuf[n] end; @@ -64,7 +62,9 @@ cirbuf[i]:= byte(Seed[i + 1]) * (i + 1); for i:= Length(Seed) to 54 do - cirbuf[i]:= i * 7 + 1 + cirbuf[i]:= i * 7 + 1; + +for i:= 0 to 1023 do GetNext end; function GetRandom: Double;