From 82216e1476dff509ba0c83bfabf5e4ec6e1075b2 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Mon, 23 Nov 2020 19:10:56 +0100 Subject: LocalPlayer:set_physics_override; minetest.register_on_recieve_physics_override --- doc/client_lua_api.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'doc') diff --git a/doc/client_lua_api.txt b/doc/client_lua_api.txt index 2802ff6c1..dd7bb3808 100644 --- a/doc/client_lua_api.txt +++ b/doc/client_lua_api.txt @@ -746,6 +746,10 @@ Call these functions only at load time! * Called when the local player open inventory * Newest functions are called first * If any function returns true, inventory doesn't open +* `minetest.register_on_recieve_physics_override(function(override))` + * Called when recieving physics_override from server + * Newest functions are called first + * If any function returns true, the physics override does not change ### Setting-related * `minetest.settings`: Settings object containing all of the settings from the @@ -1223,6 +1227,17 @@ Methods: } ``` +* `set_physics_override(override_table)` + * `override_table` is a table with the following fields: + * `speed`: multiplier to default walking speed value (default: `1`) + * `jump`: multiplier to default jump value (default: `1`) + * `gravity`: multiplier to default gravity value (default: `1`) + * `sneak`: whether player can sneak (default: `true`) + * `sneak_glitch`: whether player can use the new move code replications + of the old sneak side-effects: sneak ladders and 2 node sneak jump + (default: `false`) + * `new_move`: use new move/sneak code. When `false` the exact old code + is used for the specific old sneak behaviour (default: `true`) * `get_override_pos()` * returns override position * `get_last_pos()` -- cgit v1.2.3