1
0
mirror of https://codeberg.org/tenplus1/ambience.git synced 2025-01-11 10:30:17 +01:00

few nil checks added

This commit is contained in:
tenplus1 2020-12-24 12:10:36 +00:00
parent d79504239a
commit 43a1ebb626

View File

@ -129,11 +129,13 @@ local get_ambience = function(player, tod, name)
pos.y = pos.y + 1.4 -- head level pos.y = pos.y + 1.4 -- head level
local nod_head = pplus and playerplus[name].nod_head or minetest.get_node(pos).name local nod_head = pplus and name and playerplus[name].nod_head or
minetest.get_node(pos).name
pos.y = pos.y - 1.2 -- foot level pos.y = pos.y - 1.2 -- foot level
local nod_feet = pplus and playerplus[name].nod_feet or minetest.get_node(pos).name local nod_feet = pplus and name and playerplus[name].nod_feet or
minetest.get_node(pos).name
pos.y = pos.y - 0.2 -- reset pos pos.y = pos.y - 0.2 -- reset pos