| 83 |
|
if (!issurface(o->otype) || o->omod == OVOID) |
| 84 |
|
continue; |
| 85 |
|
/* find material */ |
| 86 |
< |
m = findmaterial(o); |
| 86 |
> |
m = findmaterial(objptr(o->omod)); |
| 87 |
|
if (m == NULL || !islight(m->otype)) |
| 88 |
|
continue; /* not source modifier */ |
| 89 |
|
|
| 544 |
|
*/ |
| 545 |
|
|
| 546 |
|
static int |
| 547 |
< |
weaksrcmat(int obj) /* identify material */ |
| 547 |
> |
weaksrcmat(OBJECT obj) /* identify material */ |
| 548 |
|
{ |
| 549 |
< |
register OBJREC *o = objptr(obj); |
| 549 |
> |
OBJREC *o = findmaterial(objptr(obj)); |
| 550 |
|
|
| 551 |
< |
while (!ismaterial(o->otype)) /* find material */ |
| 552 |
< |
o = objptr(o->omod); |
| 551 |
> |
if (o == NULL) return 0; |
| 552 |
|
return((o->otype==MAT_ILLUM)|(o->otype==MAT_GLOW)); |
| 553 |
|
} |
| 554 |
|
|