--- ray/src/rt/raytrace.c 1996/04/24 16:27:56 2.27 +++ ray/src/rt/raytrace.c 1997/12/23 18:25:15 2.29 @@ -96,12 +96,12 @@ register RAY *r; { r->rno = raynum++; r->newcset = r->clipset; + r->robj = OVOID; r->ro = NULL; - r->rot = FHUGE; + r->rt = r->rot = FHUGE; r->pert[0] = r->pert[1] = r->pert[2] = 0.0; setcolor(r->pcol, 1.0, 1.0, 1.0); setcolor(r->rcol, 0.0, 0.0, 0.0); - r->rt = 0.0; } @@ -554,7 +554,8 @@ OBJECT *cxs; checkset(oset, cxs); /* eliminate double-checking */ for (i = oset[0]; i > 0; i--) { o = objptr(oset[i]); - (*ofun[o->otype].funp)(o, r); + if ((*ofun[o->otype].funp)(o, r)) + r->robj = oset[i]; } if (r->ro == NULL) return(0); /* no scores yet */