--- ray/src/rt/srcobstr.c 2004/09/08 17:10:16 2.8 +++ ray/src/rt/srcobstr.c 2004/09/10 17:08:36 2.10 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: srcobstr.c,v 2.8 2004/09/08 17:10:16 greg Exp $"; +static const char RCSid[] = "$Id: srcobstr.c,v 2.10 2004/09/10 17:08:36 greg Exp $"; #endif /* * Source occlusion caching routines @@ -308,8 +308,16 @@ srcblocked(RAY *r) if (obs == OVOID) return(0); - op = objptr(obs); /* check for intersection */ - return((*ofun[op->otype].funp)(op, r)); + op = objptr(obs); /* check blocker intersection */ + if (!(*ofun[op->otype].funp)(op, r)) + return(0); + if (source[r->rsrc].sflags & SDISTANT) + return(1); + op = source[r->rsrc].so; /* check source intersection */ + if (!(*ofun[op->otype].funp)(op, r)) + return(1); + rayclear(r); + return(0); /* source in front */ }