mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Adding LuaError on attempt to assign vectors with values out of range
This commit is contained in:
parent
3db2f08ff9
commit
6eb6e75fff
2 changed files with 14 additions and 2 deletions
|
@ -606,10 +606,10 @@ int ObjectRef::l_set_bone_position(lua_State *L)
|
|||
bone = lua_tostring(L, 2);
|
||||
v3f position = v3f(0, 0, 0);
|
||||
if (!lua_isnil(L, 3))
|
||||
position = read_v3f(L, 3);
|
||||
position = check_v3f(L, 3);
|
||||
v3f rotation = v3f(0, 0, 0);
|
||||
if (!lua_isnil(L, 4))
|
||||
rotation = read_v3f(L, 4);
|
||||
rotation = check_v3f(L, 4);
|
||||
co->setBonePosition(bone, position, rotation);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue