| 15 |
|
|
| 16 |
|
#include "source.h" |
| 17 |
|
|
| 18 |
< |
#define ABS(x) ((x)>0 ? (x) : -(x)) |
| 18 |
> |
#if SHADCACHE /* preemptive shadow checking */ |
| 19 |
|
|
| 20 |
+ |
#ifndef MAX2SHADE |
| 21 |
+ |
#define MAX2SHADE 200 /* limit # of sources to precheck */ |
| 22 |
+ |
#endif |
| 23 |
|
|
| 24 |
< |
#if SHADCACHE /* preemptive shadow checking */ |
| 24 |
> |
#define ABS(x) ((x)>0 ? (x) : -(x)) |
| 25 |
|
|
| 26 |
|
|
| 27 |
|
OBJECT * antimodlist = NULL; /* set of clipped materials */ |
| 114 |
|
/* clear cache */ |
| 115 |
|
for (i = cachelen; i--; ) |
| 116 |
|
srcp->obscache->obs[i] = OVOID; |
| 117 |
+ |
#if (MAX2SHADE >= 0) |
| 118 |
+ |
if (sn >= MAX2SHADE) /* limit on prechecking */ |
| 119 |
+ |
return; |
| 120 |
+ |
#endif |
| 121 |
|
/* cast shadow rays */ |
| 122 |
|
if (srcp->sflags & SDISTANT) { |
| 123 |
|
for (k = 3; k--; ) |