| 99 |
|
m->otype == MAT_SPOT ? 7 : 3)) |
| 100 |
|
objerror(m, USER, "bad # arguments"); |
| 101 |
|
|
| 102 |
– |
if (m->otype == MAT_GLOW && |
| 103 |
– |
o->otype != OBJ_SOURCE && |
| 104 |
– |
m->oargs.farg[3] <= FTINY) |
| 105 |
– |
continue; /* don't bother */ |
| 102 |
|
if (m->oargs.farg[0] <= FTINY && m->oargs.farg[1] <= FTINY && |
| 103 |
|
m->oargs.farg[2] <= FTINY) |
| 104 |
|
continue; /* don't bother */ |
| 105 |
< |
|
| 105 |
> |
if (m->otype == MAT_GLOW && |
| 106 |
> |
o->otype != OBJ_SOURCE && |
| 107 |
> |
m->oargs.farg[3] <= FTINY) { |
| 108 |
> |
foundsource += (ambounce > 0); |
| 109 |
> |
continue; /* don't track these */ |
| 110 |
> |
} |
| 111 |
|
if (sfun[o->otype].of == NULL || |
| 112 |
|
sfun[o->otype].of->setsrc == NULL) |
| 113 |
|
objerror(o, USER, "illegal material"); |
| 120 |
|
if (m->otype == MAT_GLOW) { |
| 121 |
|
source[ns].sflags |= SPROX; |
| 122 |
|
source[ns].sl.prox = m->oargs.farg[3]; |
| 123 |
< |
if (source[ns].sflags & SDISTANT) |
| 123 |
> |
if (source[ns].sflags & SDISTANT) { |
| 124 |
|
source[ns].sflags |= SSKIP; |
| 125 |
+ |
foundsource += (ambounce > 0); |
| 126 |
+ |
} |
| 127 |
|
} else if (m->otype == MAT_SPOT) { |
| 128 |
|
source[ns].sflags |= SSPOT; |
| 129 |
|
if ((source[ns].sl.s = makespot(m)) == NULL) |
| 138 |
|
#if SHADCACHE |
| 139 |
|
initobscache(ns); |
| 140 |
|
#endif |
| 141 |
< |
if (!(source[ns].sflags & SSKIP)) |
| 139 |
< |
foundsource++; |
| 141 |
> |
foundsource += !(source[ns].sflags & SSKIP); |
| 142 |
|
} |
| 143 |
|
if (!foundsource) { |
| 144 |
|
error(WARNING, "no light sources found"); |