Fixed crash problem
This commit is contained in:
parent
cacd0da431
commit
307b4048ac
|
@ -8,6 +8,9 @@ end)
|
|||
function advtrains.set_trainhud(name, text)
|
||||
local hud = advtrains.hud[name]
|
||||
local player=minetest.get_player_by_name(name)
|
||||
if not player then
|
||||
return
|
||||
end
|
||||
if not hud then
|
||||
hud = {}
|
||||
advtrains.hud[name] = hud
|
||||
|
@ -53,4 +56,4 @@ function advtrains.hud_train_format(train, flip)
|
|||
elseif vel>0 then
|
||||
return firstLine.."\n"..secondLine.."\nPress up to accelerate, down to decelerate, sneak to stop."
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue