From 45ae17044726cf1541c3168c8690301beccfd6f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20=C3=85str=C3=B6m?= Date: Mon, 26 Feb 2024 20:09:41 +0100 Subject: [PATCH] Deduplicate shield slowdown removal code --- mods/ITEMS/mcl_shields/init.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_shields/init.lua b/mods/ITEMS/mcl_shields/init.lua index 2d40db2f0..9a1458b85 100644 --- a/mods/ITEMS/mcl_shields/init.lua +++ b/mods/ITEMS/mcl_shields/init.lua @@ -240,6 +240,7 @@ local shield_hud = {} local function remove_shield_hud(player) set_interact(player, true) + playerphysics.remove_physics_factor(player, "speed", "shield_speed") if not shield_hud[player] then return end --this function takes a long time. only run it when necessary player:hud_remove(shield_hud[player]) @@ -251,8 +252,6 @@ local function remove_shield_hud(player) if not hf.wielditem then player:hud_set_flags({wielditem = true}) end - - playerphysics.remove_physics_factor(player, "speed", "shield_speed") end local function add_shield_entity(player, i)