diff options
author | Y. Wang <y5nw@protonmail.com> | 2024-09-16 00:43:27 +0200 |
---|---|---|
committer | Y. Wang <y5nw@protonmail.com> | 2024-09-16 00:43:27 +0200 |
commit | c7ff2958a67b1ce0c0bebae91cc56b5da60b1878 (patch) | |
tree | b312006debfde3cfc811fe089a8228f9a5cbf4ff /advtrains/nodedb.lua | |
parent | b5d2c23b3266299c78230ccc71a055e2c1ae00fa (diff) | |
download | advtrains-c7ff2958a67b1ce0c0bebae91cc56b5da60b1878.tar.gz advtrains-c7ff2958a67b1ce0c0bebae91cc56b5da60b1878.tar.bz2 advtrains-c7ff2958a67b1ce0c0bebae91cc56b5da60b1878.zip |
More tracy wrappers for path/LZB-related functionstracy
Diffstat (limited to 'advtrains/nodedb.lua')
-rw-r--r-- | advtrains/nodedb.lua | 8 |
1 files changed, 7 insertions, 1 deletions
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 |