ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/rng.h
(Generate patch)

Comparing deliantra/server/include/rng.h (file contents):
Revision 1.3 by root, Sat Jul 10 21:07:47 2010 UTC vs.
Revision 1.4 by root, Sun Sep 5 04:18:05 2010 UTC

45{ 45{
46 uint32_t x, y; 46 uint32_t x, y;
47 47
48 void seed (uint32_t seed) 48 void seed (uint32_t seed)
49 { 49 {
50 x = seed | 1; 50 x = seed ? seed : 0xdeadbeef;
51 y = x * 69069U; 51 y = x * 69069U;
52 } 52 }
53 53
54 uint32_t next () 54 uint32_t next ()
55 { 55 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines