Fix -2 scale components;

This commit is contained in:
bjorn 2024-06-07 18:30:27 -07:00
parent d941e55f4f
commit bcf0421da9
1 changed files with 1 additions and 0 deletions

View File

@ -649,6 +649,7 @@ int luax_readscale(lua_State* L, int index, vec3 v, int components, const char*
} else if (components == -2) { // -2 is special and means "2 components: xy and z"
v[0] = v[1] = luax_tofloat(L, index);
v[2] = luax_optfloat(L, index, 1.f);
return index + 2;
} else {
v[0] = v[1] = v[2] = 1.f;
for (int i = 0; i < components; i++) {