aboutsummaryrefslogtreecommitdiff
path: root/advtrains/helpers.lua
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains/helpers.lua')
-rw-r--r--advtrains/helpers.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/advtrains/helpers.lua b/advtrains/helpers.lua
index cf890ca..cc95da2 100644
--- a/advtrains/helpers.lua
+++ b/advtrains/helpers.lua
@@ -308,6 +308,7 @@ function advtrains.get_adjacent_rail(this_posnr, this_conns_p, conn_idx, drives_
return nil
end
+ tracy.ZoneBeginN("advtrains.get_adjacent_rail")
local conn = this_conns[conn_idx]
local conn_y = conn.y or 0
local adj_pos = advtrains.dirCoordSet(this_pos, conn.c);
@@ -323,10 +324,12 @@ function advtrains.get_adjacent_rail(this_posnr, this_conns_p, conn_idx, drives_
conn_y = conn_y + 1
nextnode_ok, nextconns, nextrail_y=advtrains.get_rail_info_at(adj_pos, drives_on)
if not nextnode_ok then
+ tracy.ZoneEnd()
return nil
end
end
local adj_connid = advtrains.conn_matches_to({c=conn.c, y=conn_y}, nextconns)
+ tracy.ZoneEnd()
if adj_connid then
return adj_pos, adj_connid, conn_idx, nextrail_y, nextconns
end