diff options
Diffstat (limited to 'advtrains/trainhud.lua')
-rw-r--r-- | advtrains/trainhud.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/advtrains/trainhud.lua b/advtrains/trainhud.lua index db32824..1969f0e 100644 --- a/advtrains/trainhud.lua +++ b/advtrains/trainhud.lua @@ -274,10 +274,10 @@ function advtrains.hud_train_format(train, flip) ht[#ht+1] = sformat("%d,85=(advtrains_hud_arrow.png^[multiply\\:cyan^[transformFY^[makealpha\\:#000000)", 1+train.tarvelocity*11) end local lzb = train.lzb - if lzb and lzb.oncoming then - local oc = lzb.oncoming + if lzb and lzb.checkpoints then + local oc = lzb.checkpoints for i = 1, #oc do - local spd = oc[i].spd + local spd = oc[i].speed local c = not spd and "lime" or (type(spd) == "number" and (spd == 0) and "red" or "orange") or nil if c then ht[#ht+1] = sformat("130,10=(advtrains_hud_bg.png^[resize\\:30x5^[colorize\\:%s)",c) @@ -326,4 +326,4 @@ minetest.register_craft { {"default:paper", "advtrains:trackworker", "default:paper"}, {"default:paper", "default:paper", "default:paper"}, } -}
\ No newline at end of file +} |