| 140 |
|
} |
| 141 |
|
if (dstrsrc > FTINY) { |
| 142 |
|
/* distribute source direction */ |
| 143 |
< |
dimlist[ndims++] = sn; |
| 144 |
< |
for (i = 0; i < 3; i++) { |
| 145 |
< |
dimlist[ndims] = i + 8831; |
| 146 |
< |
vd[i] = dstrsrc * source[sn].ss * |
| 147 |
< |
(1.0 - 2.0*urand(urind(ilhash(dimlist,ndims+1),samplendx))); |
| 148 |
< |
} |
| 149 |
< |
ndims--; |
| 143 |
> |
dimlist[ndims] = sn + 8831; |
| 144 |
> |
multisamp(vd, 3, urand(ilhash(dimlist,ndims+1)+samplendx)); |
| 145 |
> |
for (i = 0; i < 3; i++) |
| 146 |
> |
vd[i] = dstrsrc * source[sn].ss * (1. - 2.*vd[i]); |
| 147 |
|
if (source[sn].sflags & SFLAT) { /* project offset */ |
| 148 |
|
d = DOT(vd, source[sn].snorm); |
| 149 |
|
for (i = 0; i < 3; i++) |