tweak(pathfinder): Add audio event and message to announce pathfinding failover#2242
Merged
xezon merged 1 commit intoTheSuperHackers:mainfrom Feb 4, 2026
Conversation
Greptile Overview
|
| Filename | Overview |
|---|---|
| Generals/Code/GameEngine/Source/GameLogic/AI/AIPathfind.cpp | Added user notification and audio feedback when pathfinding failover occurs |
| GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIPathfind.cpp | Added user notification and audio feedback when pathfinding failover occurs (Zero Hour version) |
Sequence Diagram
sequenceDiagram
participant Pathfinder
participant PathfindCell
participant TheGameText
participant TheInGameUI
participant TheAudio
Note over Pathfinder: Pathfinding crash detected
Pathfinder->>Pathfinder: Check !s_useFixedPathfinding
Pathfinder->>Pathfinder: Set s_useFixedPathfinding = true
Pathfinder->>Pathfinder: Call forceCleanCells()
activate Pathfinder
Pathfinder->>TheGameText: FETCH_OR_SUBSTITUTE("GUI:PathfindingCrashPrevented", fallback)
TheGameText-->>Pathfinder: UnicodeString message
Pathfinder->>TheInGameUI: message(pathfinderFailoverMessage)
Note over TheInGameUI: Display notification to player
Pathfinder->>TheAudio: addAudioEvent(&m_allCheerSound)
Note over TheAudio: Play cheer sound alert
Pathfinder->>PathfindCell: forceCleanPathFindCellInfos()
Note over PathfindCell: Clear all cell info states
Pathfinder->>Pathfinder: Clear m_openList and m_closedList
Pathfinder->>Pathfinder: Reset pathfind cells and release info
deactivate Pathfinder
Note over Pathfinder: Continue with fixed pathfinding
Caball009
reviewed
Feb 2, 2026
xezon
approved these changes
Feb 2, 2026
|
Some tests were cancelled. |
Author
Git Runner issues |
Author
da1b9a9 to
08a2b99
Compare
xezon
reviewed
Feb 3, 2026
08a2b99 to
5a23987
Compare
Author
|
Updated wording based on feedback. |
5a23987 to
7823384
Compare
Author
xezon
approved these changes
Feb 3, 2026
githubawn
pushed a commit
to githubawn/GeneralsGameCode
that referenced
this pull request
Feb 5, 2026
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.


This PR is to help people, on the TSH or TSH vs Retail, know that the pathfinding has switched to the crash fixed code path.
The Unicode Message is used simply since it can write straight to the game ui without any kind of tags.
I chose the cheering audio event since it's noticeable and people don't often use it during a game.
Example of the notification ingame. (ignore the mismatch message, this pathfinder crash replay always mismatches near the end).