--- ray/src/rt/rtmain.c 2006/02/05 22:22:20 2.13 +++ ray/src/rt/rtmain.c 2006/04/05 06:22:57 2.14 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rtmain.c,v 2.13 2006/02/05 22:22:20 greg Exp $"; +static const char RCSid[] = "$Id: rtmain.c,v 2.14 2006/04/05 06:22:57 greg Exp $"; #endif /* * rtmain.c - main for rtrace per-ray calculation program @@ -227,8 +227,13 @@ main(int argc, char *argv[]) /* initialize object types */ initotypes(); /* initialize urand */ - initurand(2048); - srandom(rand_samp ? (long)time(0) : 0L); + if (rand_samp) { + srandom((long)time(0)); + initurand(0); + } else { + srandom(0L); + initurand(2048); + } /* set up signal handling */ sigdie(SIGINT, "Interrupt"); #ifdef SIGHUP