--- ray/src/rt/rcontrib.c 2018/11/13 19:58:33 2.34 +++ ray/src/rt/rcontrib.c 2020/07/20 15:54:29 2.36 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rcontrib.c,v 2.34 2018/11/13 19:58:33 greg Exp $"; +static const char RCSid[] = "$Id: rcontrib.c,v 2.36 2020/07/20 15:54:29 greg Exp $"; #endif /* * Accumulate ray contributions for a set of materials @@ -179,6 +179,8 @@ quit( /* quit program */ { if (nchild > 0) /* close children if any */ end_children(code != 0); + else if (nchild < 0) + _exit(code); /* avoid flush() in child */ exit(code); } @@ -281,7 +283,7 @@ eval_irrad(FVECT org, FVECT dir) thisray.rmax = 0.0; rayorigin(&thisray, PRIMARY, NULL, NULL); /* pretend we hit surface */ - thisray.rxt = thisray.rmt = thisray.rot = 1e-5; + thisray.rxt = thisray.rot = 1e-5; thisray.rod = 1.0; VCOPY(thisray.ron, dir); VSUM(thisray.rop, org, dir, 1e-4);