From f6c6d9f03ed96176cd62af13c848d260bf124218 Mon Sep 17 00:00:00 2001 From: Ragnvald Maartmann-Moe IV Date: Thu, 6 Jun 2002 04:14:23 +0000 Subject: [PATCH] Add EF_DIMLIGHT to qw, make it work identically in nq. --- nq/source/cl_main.c | 5 +++-- qw/source/cl_ents.c | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/nq/source/cl_main.c b/nq/source/cl_main.c index 0ca47c98b..e3b4b2fa0 100644 --- a/nq/source/cl_main.c +++ b/nq/source/cl_main.c @@ -452,12 +452,13 @@ CL_NewDlight (int key, vec3_t org, int effects) VectorCopy (normal, dl->color); break; } + if (effects & EF_DIMLIGHT) { + VectorScale (dl->color, 0.5, dl->color); + } radius = 200 + (rand () & 31); if (effects & EF_BRIGHTLIGHT) { radius += 200; dl->origin[2] += 16; - } else if (effects & EF_DIMLIGHT) { - time *= 0.001; } dl->radius = radius; dl->die = cl.time + time; diff --git a/qw/source/cl_ents.c b/qw/source/cl_ents.c index b59a3812a..a0ae9d49d 100644 --- a/qw/source/cl_ents.c +++ b/qw/source/cl_ents.c @@ -119,6 +119,9 @@ CL_NewDlight (int key, vec3_t org, int effects) VectorCopy (normal, dl->color); break; } + if (effects & EF_DIMLIGHT) { + VectorScale (dl->color, 0.5, dl->color); + } radius = 200 + (rand () & 31); if (effects & EF_BRIGHTLIGHT) { radius += 200;