| 55 |
|
copycolor(r->albedo, salbedo); |
| 56 |
|
r->gecc = seccg; |
| 57 |
|
r->slights = NULL; |
| 58 |
+ |
} else if (ro->rot >= FHUGE) { /* illegal continuation */ |
| 59 |
+ |
memset(r, 0, sizeof(RAY)); |
| 60 |
+ |
return(-1); |
| 61 |
|
} else { /* spawned ray */ |
| 62 |
|
r->rlvl = ro->rlvl; |
| 63 |
|
if (rt & RAYREFL) { |
| 162 |
|
int mod |
| 163 |
|
) |
| 164 |
|
{ |
| 162 |
– |
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 |
|
|