From ef4a7ace265ed1c0fa8510911af3eae3145d35d8 Mon Sep 17 00:00:00 2001 From: Shpoike Date: Mon, 5 Jun 2023 22:43:20 +0100 Subject: [PATCH] Hexen2: Match vanilla quake's placement of EF_BRIGHTLIGHT dlights. This should also stop hexen2's torches from being in the ground. --- engine/client/cl_ents.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/engine/client/cl_ents.c b/engine/client/cl_ents.c index 52ad547d4..421f27d21 100644 --- a/engine/client/cl_ents.c +++ b/engine/client/cl_ents.c @@ -4205,7 +4205,12 @@ void CL_LinkPacketEntities (void) if (radius) { radius += r_lightflicker.value?((flicker + state->number)&31):0; - CL_NewDlight(state->number, ent->origin, radius, 0.1, colour[0], colour[1], colour[2]); + dl = CL_NewDlight(state->number, ent->origin, radius, 0.1, colour[0], colour[1], colour[2]); + + if (state->effects & EF_BRIGHTLIGHT) + { //urgh. apparently correct for vanilla quake. puts the bright effect about where the firing point is. broken for hexen2, yet still consistent with the hexen2 engine... + dl->origin[2] += 16; + } } } if ((state->lightpflags & (PFLAGS_FULLDYNAMIC|PFLAGS_CORONA)) && ((state->lightpflags&PFLAGS_FULLDYNAMIC)||state->light[3]))