diff options
-rw-r--r-- | advtrains_interlocking/route_prog.lua | 3 | ||||
-rw-r--r-- | advtrains_interlocking/routesetting.lua | 4 | ||||
-rwxr-xr-x | advtrains_signals_ks/init.lua | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/advtrains_interlocking/route_prog.lua b/advtrains_interlocking/route_prog.lua index 71ebdf3..81aa133 100644 --- a/advtrains_interlocking/route_prog.lua +++ b/advtrains_interlocking/route_prog.lua @@ -175,6 +175,9 @@ function advtrains.interlocking.visualize_route(origin, route, context, tmp_lcks -- display locks for pts, state in pairs(v.locks) do local pos = minetest.string_to_pos(pts) + if not pos then + pos = advtrains.decode_pos(pts) + end routesprite(context, pos, "fix"..k..pts, "at_il_route_lock.png", "Fixed in state '"..state.."' by route "..route.name.." until segment #"..k.." is freed.") end end diff --git a/advtrains_interlocking/routesetting.lua b/advtrains_interlocking/routesetting.lua index 6544a92..1065cad 100644 --- a/advtrains_interlocking/routesetting.lua +++ b/advtrains_interlocking/routesetting.lua @@ -86,8 +86,8 @@ function ilrs.set_route(signal, route, try) local c_locks = {} if route.use_rscache and c_ts.rs_cache and c_rseg.next then -- rscache needs to be enabled, present and next must be defined - start_pkey = advtrains.encode_pos(c_sigd.p) - end_pkey = advtrains.encode_pos(c_rseg.next.p) + local start_pkey = advtrains.encode_pos(c_sigd.p) + local end_pkey = advtrains.encode_pos(c_rseg.next.p) if c_ts.rs_cache[start_pkey] and c_ts.rs_cache[start_pkey][end_pkey] then for lp,lst in pairs(c_ts.rs_cache[start_pkey][end_pkey]) do --atdebug("Add lock from RSCache:",lp,"->",lst) diff --git a/advtrains_signals_ks/init.lua b/advtrains_signals_ks/init.lua index 326c631..70a0ac1 100755 --- a/advtrains_signals_ks/init.lua +++ b/advtrains_signals_ks/init.lua @@ -362,7 +362,7 @@ for _, rtab in ipairs({ paramtype2 = "facedir", selection_box = { type = "fixed", - fixed = {sbox, rotation_sbox} + fixed = {sbox, {-1/4, -1/2, -1/4, 1/4, -7/16, 1/4}} }, collision_box = { type = "fixed", |