--- ray/src/rt/virtuals.c 1991/08/06 15:02:36 1.22 +++ ray/src/rt/virtuals.c 1991/08/16 09:23:15 1.24 @@ -318,9 +318,9 @@ register int sn; /* target source number */ #endif return(f); /* too small a target! */ } + peano(offsdir, 3, urand(sn*931+5827+ssn), .005); for (i = 0; i < 3; i++) - offsdir[i] = or*(1. - - 2.*urand(urind(931*i+5827,ssn))); + offsdir[i] = or*(1. - 2.*offsdir[i]); ssn++; for (i = 0; i < 3; i++) sr.rorg[i] = oc[i] + offsdir[i]; @@ -348,9 +348,7 @@ register int sn; /* target source number */ nok++; /* check against obstructions */ rayclear(&sr); - sr.revf = raytrace; - rayvalue(&sr); - if (bright(sr.rcol) > FTINY) + if (!localhit(&sr, &thescene) || sr.ro == source[sn].so) nhit++; if (nhit > 0 && nhit < nok) { #ifdef DEBUG