mirror of https://github.com/bjornbytes/lovr.git
Correct indices in shape list and joint list;
This commit is contained in:
parent
b04979da8d
commit
338a544c78
|
@ -34,7 +34,7 @@ int l_lovrColliderGetShapeList(lua_State* L) {
|
|||
vec_void_t* shapes = lovrColliderGetShapes(collider);
|
||||
for (int i = 0; i < shapes->length; i++) {
|
||||
luax_pushshape(L, shapes->data[i]);
|
||||
lua_rawseti(L, -2, i);
|
||||
lua_rawseti(L, -2, i + 1);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ int l_lovrColliderGetJointList(lua_State* L) {
|
|||
vec_void_t* joints = lovrColliderGetJoints(collider);
|
||||
for (int i = 0; i < joints->length; i++) {
|
||||
luax_pushshape(L, joints->data[i]);
|
||||
lua_rawseti(L, -2, i);
|
||||
lua_rawseti(L, -2, i + 1);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue