unify(pathfinder): Move AIPathfind.h and AIPathfind.cpp to Core#2428
Merged
xezon merged 1 commit intoTheSuperHackers:mainfrom Mar 9, 2026
Merged
Conversation
|
| Filename | Overview |
|---|---|
| Core/GameEngine/Include/GameLogic/AIPathfind.h | New unified header moved from GeneralsMD with 100% similarity; uses #pragma once, GPL license, and nullptr throughout. No content changes — purely a rename into Core. |
| Core/GameEngine/Source/GameLogic/AI/AIPathfind.cpp | Source moved from GeneralsMD with 100% similarity; uses RTS_GENERALS compile-time guards throughout for game-specific branches. No content changes introduced by this PR. |
| Core/GameEngine/CMakeLists.txt | Uncomments AIPathfind.h and AIPathfind.cpp entries so the Core build system picks them up; change is minimal and correct. |
| Generals/Code/GameEngine/CMakeLists.txt | Comments out AIPathfind.h and AIPathfind.cpp so the Generals build defers to the Core version; mirrors the pattern of other unified files. |
| Generals/Code/GameEngine/Include/GameLogic/AIPathfind.h | Deleted; content was verified to be identical to the GeneralsMD version (same line count, only header branding differed) so no code is lost. |
| Generals/Code/GameEngine/Source/GameLogic/AI/AIPathfind.cpp | Deleted; confirmed identical line count (11 225 lines) to the GeneralsMD version before this PR, so no logic is dropped. |
| GeneralsMD/Code/GameEngine/CMakeLists.txt | Comments out AIPathfind.h and AIPathfind.cpp so the Zero Hour build also defers to the Core version; correct and consistent with the pattern. |
| scripts/cpp/unify_move_files.py | Adds two commented-out unify_file tracking entries for AIPathfind.cpp and AIPathfind.h to document the completed unification; no executable code added. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
subgraph Before["Before this PR"]
G_H["Generals/Code/GameEngine/\nInclude/GameLogic/AIPathfind.h"]
G_C["Generals/Code/GameEngine/\nSource/GameLogic/AI/AIPathfind.cpp"]
MD_H["GeneralsMD/Code/GameEngine/\nInclude/GameLogic/AIPathfind.h"]
MD_C["GeneralsMD/Code/GameEngine/\nSource/GameLogic/AI/AIPathfind.cpp"]
end
subgraph After["After this PR"]
CORE_H["Core/GameEngine/\nInclude/GameLogic/AIPathfind.h"]
CORE_C["Core/GameEngine/\nSource/GameLogic/AI/AIPathfind.cpp"]
GEN_BUILD["Generals Build\n(CMakeLists commented out\n→ uses Core)"]
MD_BUILD["GeneralsMD Build\n(CMakeLists commented out\n→ uses Core)"]
CORE_BUILD["Core Build\n(CMakeLists uncommented)"]
end
G_H -- "deleted" --> CORE_H
MD_H -- "renamed / moved" --> CORE_H
G_C -- "deleted" --> CORE_C
MD_C -- "renamed / moved" --> CORE_C
CORE_BUILD --> CORE_H
CORE_BUILD --> CORE_C
GEN_BUILD --> CORE_BUILD
MD_BUILD --> CORE_BUILD
Last reviewed commit: 6234d81
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 finally moves the unified Pathfinding code to core.
Not much else to say. :)
Can finally get back to making pathfinder go brrrrrrrrr.