Skip to content

fix(pathing): only show pathing/portal errors in chat on debug builds#2273

Open
3vcloud wants to merge 1 commit into
devfrom
fix/pathing-errors-debug-only
Open

fix(pathing): only show pathing/portal errors in chat on debug builds#2273
3vcloud wants to merge 1 commit into
devfrom
fix/pathing-errors-debug-only

Conversation

@3vcloud

@3vcloud 3vcloud commented Jun 18, 2026

Copy link
Copy Markdown
Member

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

  • Route all pathing/portal error & warning logging through the debug-gated PATH_LOG_ERROR / PATH_LOG_WARNING macros — they reach chat only on _DEBUG builds and otherwise go to the log file.
  • Consolidate the macro definition (previously duplicated in Pathing.cpp and PathfindingWindow.cpp) into a shared PathingLog.h, and add PATH_LOG_WARNING.
  • Convert the remaining direct Log::Error/Log::Warning calls in PortalConnections.cpp and PathfindingWindow.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 return false without 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

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant