[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 {
float a[4];
vec4f_t v;
} color = {};
} color = { .v = light->color };
sscanf (str, "%f %f %f", VectorExpandAddr (color.a));
light->color = color.v;
VectorScale (light->color, 1/255.0, light->color);