partially fixes #1

This commit is contained in:
Niklp 2022-07-04 20:57:14 +02:00 committed by GitHub
parent bbde71805a
commit ff5fb251a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -181,7 +181,7 @@ end
local physics_attrs = {"jump", "speed", "gravity"}
local function apply_physics_override(player, overrides)
if player_monoids then
if minetest.get_modpath("player_monoids") then
for _, attr in pairs(physics_attrs) do
if overrides[attr] then
player_monoids[attr]:add_change(player, overrides[attr], "hangglider:glider")
@ -226,7 +226,7 @@ minetest.register_entity("hangglider:glider", {
if not (mrn_name.walkable or mrn_name.liquidtype ~= "none") then
canExist = true
if not minetestd then
if not minetest.get_modpath("minetest_systemd") then
step_v = player:get_velocity().y
if step_v < 0 and step_v > -3 then
apply_physics_override(player, {speed=math.abs(step_v/2) + 0.75})
@ -260,7 +260,7 @@ minetest.register_entity("hangglider:glider", {
end
if not canExist then
if not minetestd then
if not minetest.get_modpath("minetest_systemd") then
remove_physics_override(player, {
gravity=1,
jump = 1,