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:
parent
d79504239a
commit
43a1ebb626
6
init.lua
6
init.lua
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user