| 24 |
|
FVECT vpos; |
| 25 |
|
double d; |
| 26 |
|
register int i; |
| 27 |
< |
|
| 27 |
> |
nextsample: |
| 28 |
|
while (++si->sp >= si->np) { /* get next sample */ |
| 29 |
|
if (++si->sn >= nsources) |
| 30 |
|
return(0.0); /* no more */ |
| 76 |
|
r->rdir[i] -= r->rorg[i]; |
| 77 |
|
/* compute distance */ |
| 78 |
|
if ((d = normalize(r->rdir)) == 0.0) |
| 79 |
< |
return(nextssamp(r, si)); /* at source! */ |
| 79 |
> |
goto nextsample; /* at source! */ |
| 80 |
|
|
| 81 |
|
/* compute sample size */ |
| 82 |
|
si->dom = source[si->sn].ss2; |
| 92 |
|
} |
| 93 |
|
if (source[si->sn].sflags & SDISTANT) |
| 94 |
|
return(FHUGE); |
| 95 |
+ |
if (si->dom <= FTINY) |
| 96 |
+ |
goto nextsample; /* behind source? */ |
| 97 |
|
si->dom /= d*d; |
| 98 |
|
return(d); /* sample OK, return distance */ |
| 99 |
|
} |