mirror of
https://github.com/bjornbytes/lovr.git
synced 2024-07-06 14:23:34 +00:00
Improve luax_readquat(nil);
This commit is contained in:
parent
898a3f9f35
commit
ad5389b1f4
|
@ -84,7 +84,7 @@ int luax_readquat(lua_State* L, int index, quat q, const char* expected) {
|
||||||
switch (lua_type(L, index)) {
|
switch (lua_type(L, index)) {
|
||||||
case LUA_TNIL:
|
case LUA_TNIL:
|
||||||
case LUA_TNONE:
|
case LUA_TNONE:
|
||||||
quat_set(q, 0, 0, 0, 0);
|
quat_set(q, 0.f, 0.f, 0.f, 1.f);
|
||||||
return ++index;
|
return ++index;
|
||||||
case LUA_TNUMBER:
|
case LUA_TNUMBER:
|
||||||
angle = luax_optfloat(L, index++, 0.f);
|
angle = luax_optfloat(L, index++, 0.f);
|
||||||
|
|
Loading…
Reference in a new issue