mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-07-04 13:47:12 -04:00
try to address
This commit is contained in:
parent
55101750d7
commit
7ebb8a9e42
2 changed files with 7 additions and 4 deletions
|
@ -19,7 +19,10 @@ read_globals = {
|
||||||
-- Silence errors about custom table methods.
|
-- Silence errors about custom table methods.
|
||||||
table = { fields = { "copy", "indexof" } },
|
table = { fields = { "copy", "indexof" } },
|
||||||
-- Silence warnings about accessing undefined fields of global 'math'
|
-- Silence warnings about accessing undefined fields of global 'math'
|
||||||
math = { fields = { "sign" } }
|
math = { fields = { "sign" } },
|
||||||
|
-- Mod support
|
||||||
|
"player_monoids",
|
||||||
|
"pova",
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Overwrites minetest.handle_node_drops
|
-- Overwrites minetest.handle_node_drops
|
||||||
|
|
|
@ -6,8 +6,8 @@ if enable_respawn == nil then
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Physics override management mods (shadow the global variable)
|
-- Physics override management mods (shadow the global variable)
|
||||||
local player_monoids = core.get_modpath("player_monoids") and _G["player_monoids"]
|
local player_monoids = core.get_modpath("player_monoids") and player_monoids
|
||||||
local pova = core.get_modpath("pova") and _G["pova"]
|
local pova = core.get_modpath("pova") and pova
|
||||||
|
|
||||||
if player_monoids and not player_monoids.speed.checkout_branch then
|
if player_monoids and not player_monoids.speed.checkout_branch then
|
||||||
-- This function exists since 2025-05-17
|
-- This function exists since 2025-05-17
|
||||||
|
@ -80,7 +80,7 @@ local function set_physics_override(player, put_to_bed)
|
||||||
pova.add_override(name, "force", OVERRIDES)
|
pova.add_override(name, "force", OVERRIDES)
|
||||||
pova.do_override(player)
|
pova.do_override(player)
|
||||||
else
|
else
|
||||||
-- Fall back to default. May conflict with other mods.
|
-- Directly use engine API. May conflict with other mods.
|
||||||
pdata.physics_override = player:get_physics_override()
|
pdata.physics_override = player:get_physics_override()
|
||||||
player:set_physics_override(OVERRIDES)
|
player:set_physics_override(OVERRIDES)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue