Start the light trace for alias models from slightly above their origin

This fixes the black candles in the DOTM start map (see vkQuake issue:
https://github.com/Novum/vkQuake/issues/367 )
This commit is contained in:
Andrei Drexler 2021-09-20 11:55:10 +03:00 committed by Ozkan Sezer
parent a1f9cce1f4
commit e632b79725

View file

@ -547,8 +547,14 @@ void R_SetupAliasLighting (entity_t *e)
int i;
int quantizedangle;
float radiansangle;
vec3_t lpos;
R_LightPoint (e->origin);
VectorCopy (e->origin, lpos);
// start the light trace from slightly above the origin
// this helps with models whose origin is below ground level, but are otherwise visible
// (e.g. some of the candles in the DOTM start map, which would otherwise appear black)
lpos[2] += e->model->maxs[2] * 0.5f;
R_LightPoint (lpos);
//add dlights
for (i=0 ; i<MAX_DLIGHTS ; i++)