>The path algorithm works by following a LOS path to the target. If it collides with an impassable spot, it uses an Edge following routine to get around it. The edge follower moves along the edge in a clockwise or counter clockwise fashion until finding the destination spot. The destination is determined by Find_Path. It is the first passable that can be reached (so it will handle the doughnut case, where there is a passable in the center of an unreachable area).
https://github.com/electronicarts/CnC_Remastered_Collection/...
https://github.com/electronicarts/CnC_Remastered_Collection/...
(on a side note the comments are incredibly detailed, considering this is from 1993-95)
https://github.com/electronicarts/CnC_Remastered_Collection
They only released the source to the game logic, not the full engine.
And of course, the game data is not free.
1. https://github.com/electronicarts/CnC_Remastered_Collection/...