mirror of
https://github.com/bjornbytes/lovr.git
synced 2024-07-04 05:23:34 +00:00
Reading arrays of vectors works with temp vectors;
This commit is contained in:
parent
92e9efd882
commit
8fa46fe236
|
@ -196,7 +196,7 @@ static void luax_readarray(lua_State* L, int index, uint32_t offset, uint32_t co
|
|||
} else {
|
||||
int n = fieldComponents[field->type];
|
||||
|
||||
if (type == LUA_TUSERDATA) {
|
||||
if (type == LUA_TUSERDATA || type == LUA_TLIGHTUSERDATA) {
|
||||
for (uint32_t i = 0; i < count; i++, data += field->stride) {
|
||||
lua_rawgeti(L, index, i + offset + 1);
|
||||
lovrCheck(lua_isuserdata(L, -1), "Expected vector object for array value (arrays must use the same type for all elements)");
|
||||
|
|
Loading…
Reference in a new issue