714 |
|
char *mod, *name; |
715 |
|
int dolower, doupper; |
716 |
|
{ |
717 |
+ |
int dosides = 0; |
718 |
|
char buf[MAXWORD]; |
719 |
|
|
720 |
|
fprintf(fp, "\n%s %s %s_light\n", mod, |
725 |
|
lampcolor[1]/shp->area, |
726 |
|
lampcolor[2]/shp->area); |
727 |
|
if (doupper && dolower && shp->type != SPHERE && shp->h > MINDIM) |
728 |
< |
if (shp->isillum) { |
728 |
< |
fprintf(fp, "\nvoid illum %s_glow\n", name); |
729 |
< |
fprintf(fp, "0\n0\n3 0 0 0\n"); |
730 |
< |
} else { |
728 |
> |
if (!shp->isillum) { |
729 |
|
fprintf(fp, "\n%s glow %s_glow\n", mod, name); |
730 |
|
fprintf(fp, "0\n0\n4 %g %g %g -1\n", |
731 |
|
lampcolor[0]/shp->area, |
732 |
|
lampcolor[1]/shp->area, |
733 |
|
lampcolor[2]/shp->area); |
734 |
+ |
dosides++; |
735 |
|
} |
736 |
|
switch (shp->type) { |
737 |
|
case RECT: |
740 |
|
putrectsrc(shp, fp, buf, name, 0); |
741 |
|
if (doupper) |
742 |
|
putrectsrc(shp, fp, buf, name, 1); |
743 |
< |
if (doupper && dolower && shp->h > MINDIM) { |
743 |
> |
if (dosides) { |
744 |
|
strcat(strcpy(buf, name), "_glow"); |
745 |
|
putsides(shp, fp, buf, name); |
746 |
|
} |
751 |
|
putdisksrc(shp, fp, buf, name, 0); |
752 |
|
if (doupper) |
753 |
|
putdisksrc(shp, fp, buf, name, 1); |
754 |
< |
if (doupper && dolower && shp->h > MINDIM) { |
754 |
> |
if (dosides) { |
755 |
|
strcat(strcpy(buf, name), "_glow"); |
756 |
|
putcyl(shp, fp, buf, name); |
757 |
|
} |