--- ray/src/rt/m_direct.c 1992/05/15 09:29:09 2.3 +++ ray/src/rt/m_direct.c 1994/12/20 20:18:17 2.5 @@ -1,4 +1,4 @@ -/* Copyright (c) 1991 Regents of the University of California */ +/* Copyright (c) 1994 Regents of the University of California */ #ifndef lint static char SCCSid[] = "$SunId$ LBL"; @@ -47,7 +47,7 @@ register RAY *r; { /* check if source ray */ if (r->rsrc >= 0 && source[r->rsrc].so != r->ro) - return; /* got the wrong guy */ + return(1); /* got the wrong guy */ /* compute first projection */ if (m->otype == MAT_DIRECT1 || (r->rsrc < 0 || source[r->rsrc].sa.sv.pn == 0)) @@ -56,6 +56,7 @@ register RAY *r; if (m->otype == MAT_DIRECT2 && (r->rsrc < 0 || source[r->rsrc].sa.sv.pn == 1)) redirect(m, r, 1); + return(1); } @@ -158,6 +159,7 @@ int n; olddot = DOT(tr.rdir, nv); if (olddot <= FTINY && olddot >= -FTINY) return(0); /* old dir parallels plane */ + tr.rmax = 0.0; rayorigin(&tr, NULL, PRIMARY, 1.0); if (!(*ofun[o->otype].funp)(o, &tr)) return(0); /* no intersection! */