--- ray/src/rt/rcontrib.c 2012/06/19 00:12:08 2.10 +++ ray/src/rt/rcontrib.c 2012/06/22 22:03:02 2.13 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rcontrib.c,v 2.10 2012/06/19 00:12:08 greg Exp $"; +static const char RCSid[] = "$Id: rcontrib.c,v 2.13 2012/06/22 22:03:02 greg Exp $"; #endif /* * Accumulate ray contributions for a set of materials @@ -7,9 +7,7 @@ static const char RCSid[] = "$Id: rcontrib.c,v 2.10 20 */ #include "rcontrib.h" -#include "source.h" #include "otypes.h" -#include "platform.h" char *shm_boundary = NULL; /* boundary of shared memory */ @@ -188,9 +186,6 @@ rcinit() if ((account = accumulate) > 1) raysleft *= accumulate; waitflush = (yres > 0) & (xres > 1) ? 0 : xres; - /* tracing to sources as well */ - for (i = 0; i < nsources; i++) - source[i].sflags |= SFOLLOW; if (nproc > 1 && in_rchild()) /* forked child? */ return; /* return to main processing loop */ @@ -336,7 +331,7 @@ rcontrib() if (raysleft && !--raysleft) break; /* preemptive EOI */ } - if ((accumulate <= 0) | (account < accumulate)) { + if (nchild != -1 && (accumulate <= 0) | (account < accumulate)) { if (account < accumulate) { error(WARNING, "partial accumulation in final record"); accumulate -= account;