From 33fd191c2f59e0a640bc9df7843c7f45df079351 Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Sun, 25 Oct 2020 21:54:19 +0100 Subject: [PATCH] built on 25/10/2020 21:54:19 --- stamina/init.lua | 15 +++++++-------- ta4_paraglider/init.lua | 4 ++-- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/stamina/init.lua b/stamina/init.lua index 77d6d36..229d874 100644 --- a/stamina/init.lua +++ b/stamina/init.lua @@ -164,8 +164,9 @@ function stamina.set_poisoned(player, poisoned) end end -local function poison_tick(player, ticks, interval, elapsed) - if not stamina.is_poisoned(player) then +local function poison_tick(player_name, ticks, interval, elapsed) + local player = minetest.get_player_by_name(player_name) + if not player or not stamina.is_poisoned(player) then return elseif elapsed > ticks then stamina.set_poisoned(player, false) @@ -174,7 +175,7 @@ local function poison_tick(player, ticks, interval, elapsed) if hp > 0 then player:set_hp(hp) end - minetest.after(interval, poison_tick, player, ticks, interval, elapsed + 1) + minetest.after(interval, poison_tick, player_name, ticks, interval, elapsed + 1) end end @@ -194,7 +195,8 @@ function stamina.poison(player, ticks, interval) return end stamina.set_poisoned(player, true) - poison_tick(player, ticks, interval, 0) + local player_name = player:get_player_name() + poison_tick(player_name, ticks, interval, 0) end --- END POISON API --- --- EXHAUSTION API --- @@ -291,10 +293,7 @@ function stamina.set_sprinting(player, sprinting) def.jump = def.jump + settings.sprint_jump end - -- Check access conflicts with other mods - if player:get_meta():get_int("player_physics_locked") == 0 then - player:set_physics_override(def) - end + player:set_physics_override(def) end if settings.sprint_particles and sprinting then diff --git a/ta4_paraglider/init.lua b/ta4_paraglider/init.lua index ec30f3b..0b23b29 100644 --- a/ta4_paraglider/init.lua +++ b/ta4_paraglider/init.lua @@ -114,14 +114,14 @@ minetest.register_entity( end if controls.right then - yaw = yaw - math.pi / 96 + yaw = yaw - math.pi / 60 vspeed = -2 hspeed = 4 player:set_look_vertical(math.tan(-vspeed / hspeed)) set_player_yaw(self, player, yaw) self.idle = 1 elseif controls.left then - yaw = yaw + math.pi / 96 + yaw = yaw + math.pi / 60 vspeed = -2 hspeed = 4 player:set_look_vertical(math.tan(-vspeed / hspeed))