1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

New physics overrides (#11465)

This commit is contained in:
Wuzzy 2023-09-15 20:10:08 +02:00 committed by GitHub
parent 2479d51cc6
commit 8ebaf753d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 148 additions and 22 deletions

View file

@ -177,6 +177,27 @@ int LuaLocalPlayer::l_get_physics_override(lua_State *L)
lua_pushboolean(L, phys.new_move);
lua_setfield(L, -2, "new_move");
lua_pushnumber(L, phys.speed_climb);
lua_setfield(L, -2, "speed_climb");
lua_pushnumber(L, phys.speed_crouch);
lua_setfield(L, -2, "speed_crouch");
lua_pushnumber(L, phys.liquid_fluidity);
lua_setfield(L, -2, "liquid_fluidity");
lua_pushnumber(L, phys.liquid_fluidity_smooth);
lua_setfield(L, -2, "liquid_fluidity_smooth");
lua_pushnumber(L, phys.liquid_sink);
lua_setfield(L, -2, "liquid_sink");
lua_pushnumber(L, phys.acceleration_default);
lua_setfield(L, -2, "acceleration_default");
lua_pushnumber(L, phys.acceleration_air);
lua_setfield(L, -2, "acceleration_air");
return 1;
}