make -gate affect linear falloff lights as well
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
parent
ee2dc38f71
commit
c193c18d5b
|
|
@ -14,6 +14,7 @@ Unreleased
|
||||||
* light: remove support for negative color components (never worked properly)
|
* light: remove support for negative color components (never worked properly)
|
||||||
* light: removed the "-nominlimit" option (now the default behaviour)
|
* light: removed the "-nominlimit" option (now the default behaviour)
|
||||||
* light: removed the "-compress" option (a bad idea from long ago)
|
* light: removed the "-compress" option (a bad idea from long ago)
|
||||||
|
* light: make -gate command line affect linear falloff lights as well
|
||||||
* vis: changed the default testlevel to 4
|
* vis: changed the default testlevel to 4
|
||||||
* vis: added the '-noambient*' options to disable auto ambient sounds.
|
* vis: added the '-noambient*' options to disable auto ambient sounds.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -198,7 +198,8 @@ CheckEntityFields(entity_t *entity)
|
||||||
|
|
||||||
if (entity->formula == LF_LINEAR) {
|
if (entity->formula == LF_LINEAR) {
|
||||||
/* Linear formula always has a falloff point */
|
/* Linear formula always has a falloff point */
|
||||||
entity->fadedist = fabs(entity->light.light / entity->atten / scaledist);
|
entity->fadedist = fabs(entity->light.light) - fadegate;
|
||||||
|
entity->fadedist = entity->fadedist / entity->atten / scaledist;
|
||||||
} else if (fadegate < EQUAL_EPSILON) {
|
} else if (fadegate < EQUAL_EPSILON) {
|
||||||
/* If fadegate is tiny, other lights have effectively infinite reach */
|
/* If fadegate is tiny, other lights have effectively infinite reach */
|
||||||
entity->fadedist = VECT_MAX;
|
entity->fadedist = VECT_MAX;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue