ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/Development/ray/src/rt/RcontribSimulManager.cpp
(Generate patch)

Comparing ray/src/rt/RcontribSimulManager.cpp (file contents):
Revision 2.23 by greg, Tue Nov 11 02:08:52 2025 UTC vs.
Revision 2.24 by greg, Wed Nov 12 19:41:21 2025 UTC

# Line 191 | Line 191 | RcontribSimulManager::SetDataFormat(int ty)
191   int
192   RcontribSimulManager::RctCall(RAY *r, void *cd)
193   {
194 <        if (!r->ro || r->ro->omod == OVOID)     // hit nothing?
195 <                return 0;
196 <                                                // shadow ray not on source?
194 >        int     i;
195 >
196 >        if (!r->ro || (i = r->ro->omod) == OVOID)
197 >                return 0;               // hit nothing
198 >
199          if (r->rsrc >= 0 && source[r->rsrc].so != r->ro)
200 <                return 0;
200 >                return 0;               // shadow ray not on source
201  
202 <        const char *            mname = objptr(r->ro->omod)->oname;
202 >        const char *            mname = objptr(i)->oname;
203          RcontribSimulManager *  rcp = (RcontribSimulManager *)cd;
204          RcontribMod *           mp = (RcontribMod *)lu_find(&rcp->modLUT,mname)->data;
205          if (!mp)
206                  return 0;               // not in our modifier list
207  
208 <        int     i;                      // pre-emptive check for zero
207 <        if (rcp->HasFlag(RCcontrib)) {
208 >        if (rcp->HasFlag(RCcontrib)) {  // pre-emptive check for zero
209                  for (i = NCSAMP; i--; )
210                          if (r->rcoef[i]*r->rcol[i] > FTINY)
211                                  break;

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)