diff options
author | orwell96 <mono96.mml@gmail.com> | 2016-10-15 12:07:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-15 12:07:55 +0200 |
commit | def57bcab87d57285b194827e63e734004eb3bfb (patch) | |
tree | ceb92bbb4b16767d898b11c8837a4e41c369f905 /trainhud.lua | |
parent | 8cae3cf9ee035757d5004389d12634f1a34f90bc (diff) | |
parent | c936b824d6453cf942e30e423c0de28b7018f782 (diff) | |
download | advtrains-def57bcab87d57285b194827e63e734004eb3bfb.tar.gz advtrains-def57bcab87d57285b194827e63e734004eb3bfb.tar.bz2 advtrains-def57bcab87d57285b194827e63e734004eb3bfb.zip |
Merge pull request #5 from gpcf/master
Now honors protections
Diffstat (limited to 'trainhud.lua')
-rw-r--r-- | trainhud.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/trainhud.lua b/trainhud.lua index 601b28f..81b9e94 100644 --- a/trainhud.lua +++ b/trainhud.lua @@ -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
\ No newline at end of file +end |