| 162 |
|
int mod |
| 163 |
|
) |
| 164 |
|
{ |
| 165 |
– |
int gotmat; |
| 165 |
|
register OBJREC *m; |
| 166 |
+ |
|
| 167 |
|
r->rt = r->rot; /* set effective ray length */ |
| 168 |
< |
for (gotmat = 0; !gotmat && mod != OVOID; mod = m->omod) { |
| 168 |
> |
for ( ; mod != OVOID; mod = m->omod) { |
| 169 |
|
m = objptr(mod); |
| 170 |
|
/****** unnecessary test since modifier() is always called |
| 171 |
|
if (!ismodifier(m->otype)) { |
| 184 |
|
if (!islight(m->otype)) |
| 185 |
|
m = &Lamb; |
| 186 |
|
} |
| 187 |
< |
/* materials call raytexture */ |
| 188 |
< |
gotmat = (*ofun[m->otype].funp)(m, r); |
| 187 |
> |
if ((*ofun[m->otype].funp)(m, r)) |
| 188 |
> |
return(1); /* materials call raytexture() */ |
| 189 |
|
} |
| 190 |
< |
return(gotmat); |
| 190 |
> |
return(0); /* no material! */ |
| 191 |
|
} |
| 192 |
|
|
| 193 |
|
|