mirror of https://github.com/bjornbytes/lovr.git
Fix -2 scale components;
This commit is contained in:
parent
d941e55f4f
commit
bcf0421da9
|
@ -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++) {
|
||||
|
|
Loading…
Reference in New Issue