mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 10:31:50 +00:00
fix rig:set_matrix for nil index
This commit is contained in:
parent
da925021cb
commit
4370eedc0a
1 changed files with 3 additions and 0 deletions
|
|
@ -77,6 +77,9 @@ static int l_get_matrix(lua::State* L) {
|
|||
|
||||
static int l_set_matrix(lua::State* L) {
|
||||
if (auto skeleton = get_skeleton(L)) {
|
||||
if (lua::isnoneornil(L, 2)) {
|
||||
return 0;
|
||||
}
|
||||
auto index = index_range_check(*skeleton, lua::tointeger(L, 2));
|
||||
skeleton->pose.matrices[index] = lua::tomat4(L, 3);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue