0
0
Fork 0
mirror of https://git.code.sf.net/p/quake/quakeforge synced 2025-02-27 22:21:00 +00:00

[client] Preserve intensity when parsing light color

Due to the mis-initialization of the union used to parse the color
vector, the intensity was incorrectly set to zero and thus the light
dropped, meaning that all lights in ad_tears were lost.
This commit is contained in:
Bill Currie 2022-08-19 20:14:02 +09:00
parent 1e54799f69
commit f611b0d5a1

View file

@ -201,7 +201,7 @@ parse_light (light_t *light, int *style, const plitem_t *entity,
union { union {
float a[4]; float a[4];
vec4f_t v; vec4f_t v;
} color = {}; } color = { .v = light->color };
sscanf (str, "%f %f %f", VectorExpandAddr (color.a)); sscanf (str, "%f %f %f", VectorExpandAddr (color.a));
light->color = color.v; light->color = color.v;
VectorScale (light->color, 1/255.0, light->color); VectorScale (light->color, 1/255.0, light->color);