diff options
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/lua_api/l_object.cpp | 11 | ||||
-rw-r--r-- | src/script/lua_api/l_object.h | 3 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/script/lua_api/l_object.cpp b/src/script/lua_api/l_object.cpp index cbcaa40eb..5e1517e46 100644 --- a/src/script/lua_api/l_object.cpp +++ b/src/script/lua_api/l_object.cpp @@ -349,7 +349,8 @@ int ObjectRef::l_set_armor_groups(lua_State *L) return 0; } -// set_physics_override(self, physics_override_speed, physics_override_jump, physics_override_gravity) +// set_physics_override(self, physics_override_speed, physics_override_jump, +// physics_override_gravity, sneak, sneak_glitch) int ObjectRef::l_set_physics_override(lua_State *L) { ObjectRef *ref = checkobject(L, 1); @@ -368,6 +369,14 @@ int ObjectRef::l_set_physics_override(lua_State *L) co->m_physics_override_gravity = lua_tonumber(L, 4); co->m_physics_override_sent = false; } + if (lua_isboolean(L, 5)) { + co->m_physics_override_sneak = lua_toboolean(L, 5); + co->m_physics_override_sent = false; + } + if (lua_isboolean(L, 6)) { + co->m_physics_override_sneak_glitch = lua_toboolean(L, 6); + co->m_physics_override_sent = false; + } return 0; } diff --git a/src/script/lua_api/l_object.h b/src/script/lua_api/l_object.h index 4b4f5eff7..c8c67f2c5 100644 --- a/src/script/lua_api/l_object.h +++ b/src/script/lua_api/l_object.h @@ -101,7 +101,8 @@ private: // set_armor_groups(self, groups) static int l_set_armor_groups(lua_State *L); - // set_physics_override(self, physics_override_speed, physics_override_jump, physics_override_gravity) + // set_physics_override(self, physics_override_speed, physics_override_jump, + // physics_override_gravity, sneak, sneak_glitch) static int l_set_physics_override(lua_State *L); // set_animation(self, frame_range, frame_speed, frame_blend) |