rtx: do not divide RGB lights by 255, fix #116

This commit is contained in:
Ivan 'provod' Avdeev 2021-10-20 09:30:39 -07:00 committed by Ivan Avdeev
parent dcd5ff959c
commit c1f93ffc54
1 changed files with 2 additions and 2 deletions

View File

@ -217,10 +217,10 @@ static unsigned parseEntPropVec3(const string value, vec3_t *out, unsigned bit)
}
static unsigned parseEntPropRgbav(const string value, vec3_t *out, unsigned bit) {
float scale = 1.f / 255.f;
float scale = 1.f;
const int components = sscanf(value, "%f %f %f %f", &(*out)[0], &(*out)[1], &(*out)[2], &scale);
if (components == 1) {
(*out)[2] = (*out)[1] = (*out)[0] = (*out)[0] / 255.f;
(*out)[2] = (*out)[1] = (*out)[0] = (*out)[0];
return bit;
} else if (components == 4) {
scale /= 255.f;