From c238fd9ba7ad07fa4f6e2a74e89ec8b2a41280ad Mon Sep 17 00:00:00 2001 From: epCode Date: Tue, 16 Feb 2021 14:18:06 -0800 Subject: [PATCH] Set swiming detection to "node_feet" --- mods/PLAYER/mcl_player/init.lua | 2 +- mods/PLAYER/mcl_playerplus/init.lua | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/mods/PLAYER/mcl_player/init.lua b/mods/PLAYER/mcl_player/init.lua index 2ca7b2aa08..5e36b64045 100644 --- a/mods/PLAYER/mcl_player/init.lua +++ b/mods/PLAYER/mcl_player/init.lua @@ -157,7 +157,7 @@ minetest.register_globalstep(function(dtime) -- ask if player is in a place which he should crawl node_in_feet = minetest.registered_nodes[mcl_playerinfo[name].node_feet] -- ask if player is swiming - standing_on_water = minetest.get_item_group(mcl_playerinfo[name].node_stand, "water") ~= 0 + standing_on_water = minetest.get_item_group(mcl_playerinfo[name].node_feet, "water") ~= 0 diff --git a/mods/PLAYER/mcl_playerplus/init.lua b/mods/PLAYER/mcl_playerplus/init.lua index 2d18170ac6..34291c8f2f 100644 --- a/mods/PLAYER/mcl_playerplus/init.lua +++ b/mods/PLAYER/mcl_playerplus/init.lua @@ -26,8 +26,6 @@ minetest.register_globalstep(function(dtime) -- controls head bone local pitch = degrees(player:get_look_vertical()) * -1 - local node_in_feet = minetest.registered_nodes[mcl_playerinfo[name].node_feet] - -- controls right and left arms pitch when shooting a bow or punching if string.find(player:get_wielded_item():get_name(), "mcl_bows:bow") and controls.RMB and not controls.LMB and not controls.up and not controls.down and not controls.left and not controls.right then player:set_bone_position("Arm_Right_Pitch_Control", vector.new(-3,5.785,0), vector.new(pitch+90,-30,pitch * -1 * .35)) @@ -46,7 +44,7 @@ minetest.register_globalstep(function(dtime) -- sets eye height, and nametag color accordingly player:set_properties({collisionbox = {-0.35,0,-0.35,0.35,1.8,0.35}, eye_height = 1.35, nametag_color = { r = 225, b = 225, a = 0, g = 225 }}) - elseif minetest.get_item_group(mcl_playerinfo[name].node_stand, "water") ~= 0 and player:get_attach() == nil then + elseif minetest.get_item_group(mcl_playerinfo[name].node_feet, "water") ~= 0 and player:get_attach() == nil then -- controls head pitch when swiming player:set_bone_position("Head", vector.new(0,6.3,0), vector.new(pitch+90,0,0)) -- sets eye height, and nametag color accordingly