Conversation
…ers#3429) Some inlined functions had to be made non-inline for this to compile.
…ckers#3429) Move cell type-comparison predicates into `PathfindCell` as static methods and update `AIPathfind.cpp` zone and block calculations to use the class-scoped helpers.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review. WalkthroughThe change adds Pathfinder constants, cell and pooled-info state, path nodes and route operations, bridge and wall layer handling, and zone calculation and lookup. It registers the Pathfinder headers and sources in the GameEngine build and includes compatibility-specific behavior under documented compile-time conditions. ChangesPathfinder implementation
Priority: ⬇️ Low Estimated code review effort: 4 (Complex) | ~60 minutes Change: Refactor Merge Risk: ⚪ Minimal · up to This change moves the pathfinder zone-management code into its own source file. No concrete defects were found in this update, so it appears ready to merge after normal build checks. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
fc7abbf to
673db51
Compare
| inline UnsignedShort getXIndex() const {return m_info->m_pos.x;} | ||
| inline UnsignedShort getYIndex() const {return m_info->m_pos.y;} | ||
|
|
||
| inline Bool isBlockedByAlly() const; |
There was a problem hiding this comment.
Compiler didn't want to play nice with some of the functions being inlined, so it was removed.
| void setConnectLayer( PathfindLayerEnum layer ) { m_connectsToLayer = layer; } ///< set the cell layer connect id | ||
| PathfindLayerEnum getConnectLayer() const { return (PathfindLayerEnum)m_connectsToLayer; } ///< get the cell layer connect id | ||
|
|
||
| static Bool typesMatch(const PathfindCell& targetCell, const PathfindCell& sourceCell); |
There was a problem hiding this comment.
These were global functions that better fit as a static function in the PathfindCell class
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
2b56a31b-122e-4e08-b863-f35a3f59cbc5
📒 Files selected for processing (16)
Core/GameEngine/CMakeLists.txtCore/GameEngine/Include/GameLogic/AIPathfind.hCore/GameEngine/Include/GameLogic/Pathfinder/PathfindCell.hCore/GameEngine/Include/GameLogic/Pathfinder/PathfindCellInfo.hCore/GameEngine/Include/GameLogic/Pathfinder/PathfindConstants.hCore/GameEngine/Include/GameLogic/Pathfinder/ZoneBlock.hCore/GameEngine/Source/GameLogic/AI/AIPathfind.cppCore/GameEngine/Source/GameLogic/AI/Pathfinder/Path.cppCore/GameEngine/Source/GameLogic/AI/Pathfinder/PathNode.cppCore/GameEngine/Source/GameLogic/AI/Pathfinder/PathfindCell.cppCore/GameEngine/Source/GameLogic/AI/Pathfinder/PathfindCellInfo.cppCore/GameEngine/Source/GameLogic/AI/Pathfinder/PathfindCellList.cppCore/GameEngine/Source/GameLogic/AI/Pathfinder/PathfindConstants.cppCore/GameEngine/Source/GameLogic/AI/Pathfinder/PathfindLayer.cppCore/GameEngine/Source/GameLogic/AI/Pathfinder/PathfindZoneManager.cppCore/GameEngine/Source/GameLogic/AI/Pathfinder/ZoneBlock.cpp
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
673db51 to
0912535
Compare
This PR extracts several pathfinder class implementations from the aipathfind.cpp source file into their own source files to increase readability and maintainability. This is another step into refactoring the pathfinding code.
Todo: