490 |
|
if (xmit) /* apply pattern on transmit */ |
491 |
|
multcolor(sr.rcoef, ndp->pr->pcol); |
492 |
|
if (rayorigin(&sr, SPECULAR, ndp->pr, sr.rcoef) < 0) { |
493 |
< |
if (maxdepth > 0) |
494 |
< |
break; |
495 |
< |
continue; /* Russian roulette victim */ |
493 |
> |
if (!n & (nstarget > 1)) { |
494 |
> |
n = nstarget; /* avoid infinitue loop */ |
495 |
> |
nstarget = nstarget*sr.rweight/minweight; |
496 |
> |
if (n == nstarget) break; |
497 |
> |
n = -1; /* moved target */ |
498 |
> |
} |
499 |
> |
continue; /* try again */ |
500 |
|
} |
501 |
|
if (xmit && ndp->thick != 0) /* need to offset origin? */ |
502 |
|
VSUM(sr.rorg, sr.rorg, ndp->pr->ron, -ndp->thick); |