diff options
Diffstat (limited to 'src/script/lua_api/l_localplayer.cpp')
-rw-r--r-- | src/script/lua_api/l_localplayer.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/script/lua_api/l_localplayer.cpp b/src/script/lua_api/l_localplayer.cpp index 2efb976c7..1066beed1 100644 --- a/src/script/lua_api/l_localplayer.cpp +++ b/src/script/lua_api/l_localplayer.cpp @@ -157,23 +157,24 @@ int LuaLocalPlayer::l_get_physics_override(lua_State *L) { LocalPlayer *player = getobject(L, 1); + const auto &phys = player->physics_override; lua_newtable(L); - lua_pushnumber(L, player->physics_override_speed); + lua_pushnumber(L, phys.speed); lua_setfield(L, -2, "speed"); - lua_pushnumber(L, player->physics_override_jump); + lua_pushnumber(L, phys.jump); lua_setfield(L, -2, "jump"); - lua_pushnumber(L, player->physics_override_gravity); + lua_pushnumber(L, phys.gravity); lua_setfield(L, -2, "gravity"); - lua_pushboolean(L, player->physics_override_sneak); + lua_pushboolean(L, phys.sneak); lua_setfield(L, -2, "sneak"); - lua_pushboolean(L, player->physics_override_sneak_glitch); + lua_pushboolean(L, phys.sneak_glitch); lua_setfield(L, -2, "sneak_glitch"); - lua_pushboolean(L, player->physics_override_new_move); + lua_pushboolean(L, phys.new_move); lua_setfield(L, -2, "new_move"); return 1; |