ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/rcontrib.c
(Generate patch)

Comparing ray/src/rt/rcontrib.c (file contents):
Revision 2.20 by greg, Sat Jul 19 18:19:33 2014 UTC vs.
Revision 2.21 by greg, Sat Jul 19 18:39:35 2014 UTC

# Line 274 | Line 274 | trace_contrib(RAY *r)
274          if (mp == NULL)                         /* not in our list? */
275                  return;
276  
277 <        worldfunc(RCCONTEXT, r);                /* else get bin number */
278 <        if (mp->params != last_params)
277 >        worldfunc(RCCONTEXT, r);                /* else set context */
278 >        if ((mp->params != NULL) & (mp->params != last_params) &&
279 >                        (last_params == NULL || strcmp(mp->params, last_params)))
280                  set_eparams(last_params = (char *)mp->params);
281 <        if ((bval = evalue(mp->binv)) <= -.5)
282 <                return;                         /* silently ignore */
281 >        if ((bval = evalue(mp->binv)) <= -.5)   /* and get bin number */
282 >                return;                         /* silently ignore negatives */
283          if ((bn = (int)(bval + .5)) >= mp->nbins) {
284                  error(WARNING, "bad bin number (ignored)");
285                  return;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines