1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-05 10:00:26 +01:00

[warps & hudbars] Fixes

- Fix #287
This commit is contained in:
LeMagnesium 2015-09-27 22:46:09 +02:00
parent 1e83c2a28f
commit 7d4e84e483
2 changed files with 2 additions and 2 deletions

View File

@ -194,7 +194,7 @@ function hb.change_hudbar(player, identifier, new_value, new_max_value)
max_changed = true
end
else
new_max_value = hudtable.hudstate[name].max
new_max_value = (hudtable.hudstate[name] or {max = 0}).max
end
local main_error_text =

View File

@ -46,7 +46,7 @@ do_warp_queue = function()
local t = minetest.get_us_time()
for i = table.getn(warps_queue),1,-1 do
local e = warps_queue[i]
if e.p:getpos().x == e.pos.x and e.p:getpos().y == e.pos.y and e.p:getpos().z == e.pos.z then
if e and e.p and e.p:getpos() and e.p:getpos().x == e.pos.x and e.p:getpos().y == e.pos.y and e.p:getpos().z == e.pos.z then
if t > e.t then
warp(e.p, e.w)
table.remove(warps_queue, i)