| 41 |
|
|
| 42 |
|
marksources() /* find and mark source objects */ |
| 43 |
|
{ |
| 44 |
+ |
int foundsource = 0; |
| 45 |
|
int i; |
| 46 |
|
register OBJREC *o, *m; |
| 47 |
|
register int ns; |
| 94 |
|
source[ns].sflags |= SSKIP; |
| 95 |
|
} |
| 96 |
|
} |
| 97 |
+ |
if (!(source[ns].sflags & SSKIP)) |
| 98 |
+ |
foundsource++; |
| 99 |
|
} |
| 100 |
< |
if (nsources <= 0) { |
| 100 |
> |
if (!foundsource) { |
| 101 |
|
error(WARNING, "no light sources found"); |
| 102 |
|
return; |
| 103 |
|
} |
| 264 |
|
l = m; |
| 265 |
|
} |
| 266 |
|
} |
| 267 |
+ |
if (ncnts == 0) |
| 268 |
+ |
return; /* no contributions! */ |
| 269 |
|
/* accumulate tail */ |
| 270 |
|
for (sn = ncnts-1; sn > 0; sn--) |
| 271 |
|
cntord[sn-1].brt += cntord[sn].brt; |