#3531 closed defect (fixed)
[PATCH] Some obsolete code when compiling with DISABLE_PATHFINDER
Reported by: | elexis | Owned by: | Stan |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 19 |
Component: | Core engine | Keywords: | pathfinding patch |
Cc: | Patch: |
Description
In CCmpUnitMotion::BeginPathing
, the function GetNearestPointOnGoal
would be used if we'd compile with DISABLE_PATHFINDER
. But this function does not exist anymore, so it should be either removed or fixed.
The call to the function was introduced in r16751 and that function was removed in the same commit.
Attachments (3)
Change History (9)
by , 9 years ago
Attachment: | 3531 - Remove last reference.patch added |
---|
comment:1 by , 9 years ago
Keywords: | review patch added |
---|---|
Owner: | set to |
Status: | new → assigned |
Summary: | Some obsolete code when compiling with DISABLE_PATHFINDER → [PATCH] Some obsolete code when compiling with DISABLE_PATHFINDER |
We could also reinclude the function I can make the patch.
comment:2 by , 9 years ago
Keywords: | review removed |
---|
By removing I meant removing the functionality (compiling without the pathfinder) as a whole. That flag is only used in this one place, so it wouldn't be a great loss.
If we keep that functionality, it should actually work. I'm not sure if we would need to reintroduce GetNearestPointOnGoal
as the new pathfinder probably has the same or similar function under a different name.
by , 9 years ago
Attachment: | 3531 - Remove DISABLE_PATHFINDER option.patch added |
---|
Updated Patch → I misunderstood what you meant.
comment:3 by , 9 years ago
Keywords: | review added |
---|---|
Milestone: | Backlog → Alpha 20 |
comment:4 by , 9 years ago
The equivalent function would be the long-range pathfinder's MakeGoalReachable (it can't be used in this situation though). This code is useful for testing purposes only, so I guess using the goal center coordinates would be fine.
by , 9 years ago
Attachment: | 3531 - Fix DISABLE_PATHFINDER option.patch added |
---|
Rename it to long pathfinder as the short one isn't affected.
comment:6 by , 9 years ago
Keywords: | review removed |
---|---|
Milestone: | Alpha 20 → Alpha 19 |
Easy fix for it by removing the last reference.