60 |
|
|
61 |
|
if (!issurface(o->otype) || o->omod == OVOID) |
62 |
|
continue; |
63 |
< |
|
63 |
> |
/* find material */ |
64 |
|
m = objptr(o->omod); |
65 |
< |
|
66 |
< |
if (!islight(m->otype)) |
67 |
< |
continue; |
65 |
> |
while (!ismaterial(m->otype)) |
66 |
> |
if (ismixture(m->otype) || m->omod == OVOID) { |
67 |
> |
m = NULL; |
68 |
> |
break; |
69 |
> |
} else |
70 |
> |
m = objptr(m->omod); |
71 |
> |
if (m == NULL || !islight(m->otype)) |
72 |
> |
continue; /* not source modifier */ |
73 |
|
|
74 |
|
if (m->oargs.nfargs != (m->otype == MAT_GLOW ? 4 : |
75 |
|
m->otype == MAT_SPOT ? 7 : 3)) |
496 |
|
* geometry behind (or inside) an effective radiator. |
497 |
|
*/ |
498 |
|
|
499 |
< |
static int weaksrcmod(obj) int obj; /* efficiency booster function */ |
500 |
< |
{register OBJREC *o = objptr(obj); |
501 |
< |
return((o->otype==MAT_ILLUM)|(o->otype==MAT_GLOW));} |
499 |
> |
static int |
500 |
> |
weaksrcmat(int obj) /* identify material */ |
501 |
> |
{ |
502 |
> |
register OBJREC *o = objptr(obj); |
503 |
> |
|
504 |
> |
while (!ismaterial(o->otype)) /* find material */ |
505 |
> |
o = objptr(o->omod); |
506 |
> |
return((o->otype==MAT_ILLUM)|(o->otype==MAT_GLOW)); |
507 |
> |
} |
508 |
|
|
509 |
|
#define illumblock(m, r) (!(source[r->rsrc].sflags&SVIRTUAL) && \ |
510 |
|
r->rod > 0.0 && \ |
511 |
< |
weaksrcmod(source[r->rsrc].so->omod)) |
511 |
> |
weaksrcmat(source[r->rsrc].so->omod)) |
512 |
|
|
513 |
|
/* wrongsource * |
514 |
|
* |