From c7ff2958a67b1ce0c0bebae91cc56b5da60b1878 Mon Sep 17 00:00:00 2001 From: "Y. Wang" Date: Mon, 16 Sep 2024 00:43:27 +0200 Subject: More tracy wrappers for path/LZB-related functions --- advtrains/nodedb.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'advtrains/nodedb.lua') diff --git a/advtrains/nodedb.lua b/advtrains/nodedb.lua index 41ac089..51f0e24 100644 --- a/advtrains/nodedb.lua +++ b/advtrains/nodedb.lua @@ -269,17 +269,23 @@ end --nil if the node is neither loaded nor in trackdb --the distraction between false and nil will be needed only in special cases.(train initpos) function advtrains.get_rail_info_at(pos, drives_on) + tracy.ZoneBegin("advtrains.get_rail_info_at") local rdp=advtrains.round_vector_floor_y(pos) local node=ndb.get_node_or_nil(rdp) - if not node then return end + if not node then + tracy.ZoneEnd() + return + end local nodename=node.name if(not advtrains.is_track_and_drives_on(nodename, drives_on)) then + tracy.ZoneEnd() return false end local conns, railheight, tracktype=advtrains.get_track_connections(node.name, node.param2) + tracy.ZoneEnd() return true, conns, railheight end -- cgit v1.2.3