From 5c928575f87980c20a0403033acae373d3ef7857 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Sat, 17 Apr 2021 18:15:45 +0200 Subject: [PATCH] Fix #1572, server crash during login --- mods/PLAYER/mcl_playerplus/init.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mods/PLAYER/mcl_playerplus/init.lua b/mods/PLAYER/mcl_playerplus/init.lua index 8dad7b2c5b..b14d348243 100644 --- a/mods/PLAYER/mcl_playerplus/init.lua +++ b/mods/PLAYER/mcl_playerplus/init.lua @@ -183,10 +183,11 @@ minetest.register_globalstep(function(dtime) player_vel_yaw = limit_vel_yaw(player_vel_yaw, yaw) player_vel_yaws[name] = player_vel_yaw - if minetest.get_node_or_nil({x=player:get_pos().x, y=player:get_pos().y - 0.5, z=player:get_pos().z}) then - node_stand_return = minetest.get_node_or_nil({x=player:get_pos().x, y=player:get_pos().y - 0.1, z=player:get_pos().z}).name - else - minetest.log("action", "somehow player got of loaded areas") + local pos = player:get_pos() + local node = minetest.get_node_or_nil({x = pos.x, y = pos.y - 0.5, z = pos.z}) + + if node then + node_stand_return = node.name end local chestplate = player:get_inventory():get_stack("armor", 3)