165 |
|
if (ofun[OBJ_SPHERE].funp == o_default) |
166 |
|
initotypes(); |
167 |
|
/* initialize urand */ |
168 |
< |
srandom(rand_samp ? (long)time(0) : 0L); |
169 |
< |
initurand(2048); |
168 |
> |
if (rand_samp) { |
169 |
> |
srandom((long)time(0)); |
170 |
> |
initurand(0); |
171 |
> |
} else { |
172 |
> |
srandom(0L); |
173 |
> |
initurand(2048); |
174 |
> |
} |
175 |
|
/* read scene octree */ |
176 |
|
readoct(octname = otnm, ~(IO_FILES|IO_INFO), &thescene, NULL); |
177 |
|
nsceneobjs = nobjects; |
188 |
|
) |
189 |
|
{ |
190 |
|
rayorigin(r, PRIMARY, NULL, NULL); |
191 |
< |
samplendx = rand_samp ? random() : samplendx+1; |
191 |
> |
samplendx++; |
192 |
|
rayvalue(r); /* assumes origin and direction are set */ |
193 |
|
} |
194 |
|
|