fix(pathing): only show pathing/portal errors in chat on debug builds#2273
Open
3vcloud wants to merge 1 commit into
Open
fix(pathing): only show pathing/portal errors in chat on debug builds#22733vcloud wants to merge 1 commit into
3vcloud wants to merge 1 commit into
Conversation
Portal-connection load failures (e.g. "Could not open portal connections file") and pathfinding diagnostics were logged via Log::Error/Log::Warning, which surface as transient in-game chat messages in release builds. These failures are expected during normal play (unreachable markers, missing DAT data) and just add noise. Route them through debug-gated PATH_LOG_ERROR/PATH_LOG_WARNING macros so they only reach chat on _DEBUG builds and otherwise go to the log file. The macros were already duplicated in Pathing.cpp and PathfindingWindow.cpp; consolidate them into a shared PathingLog.h and add PATH_LOG_WARNING. All failure paths already degrade gracefully (empty connections / Euclidean fallback). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A user reported the new build showing "can not open portal connections file" in-game on startup. Pathing/portal-connection failures were logged via
Log::Error/Log::Warning, which render as transient in-game chat messages in release builds. These failures are expected during normal play (unreachable markers, missing/mismatched DAT data, portal data that can't be parsed) and are just noise to end users.Change
PATH_LOG_ERROR/PATH_LOG_WARNINGmacros — they reach chat only on_DEBUGbuilds and otherwise go to the log file.Pathing.cppandPathfindingWindow.cpp) into a sharedPathingLog.h, and addPATH_LOG_WARNING.Log::Error/Log::Warningcalls inPortalConnections.cppandPathfindingWindow.cpp([Trapezoid]/[FileId]/AStar diagnostics, embedded-resource load failure).Graceful handling
All affected failure paths already degrade safely —
Initialize()continues with empty portal connections, parse failures returnfalsewithout partial corruption, and the trapezoid/file-id paths fall back to a Euclidean estimate. No behavioural change other than where the messages go.🤖 Generated with Claude Code