287 |
|
getplaneq(onorm, o); |
288 |
|
/* set number of rays to sample */ |
289 |
|
if (source[sn].sflags & SDISTANT) { |
290 |
< |
n = 4.*or2/(thescene.cusize*thescene.cusize)*vspretest + .5; |
290 |
> |
/* 32. == heuristic constant */ |
291 |
> |
n = 32.*or2/(thescene.cusize*thescene.cusize)*vspretest + .5; |
292 |
|
infront = DOT(onorm, source[sn].sloc) > 0.; |
293 |
|
} else { |
294 |
|
for (i = 0; i < 3; i++) |
349 |
|
nok++; |
350 |
|
/* check against obstructions */ |
351 |
|
rayclear(&sr); |
352 |
< |
if (!localhit(&sr, &thescene) || sr.ro == source[sn].so) |
352 |
> |
sr.revf = raytrace; |
353 |
> |
rayvalue(&sr); |
354 |
> |
if (bright(sr.rcol) > FTINY) |
355 |
|
nhit++; |
356 |
|
if (nhit > 0 && nhit < nok) { |
357 |
|
#ifdef DEBUG |