Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#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)

3531 - Remove last reference.patch (622 bytes ) - added by Stan 9 years ago.
Easy fix for it by removing the last reference.
3531 - Remove DISABLE_PATHFINDER option.patch (1.3 KB ) - added by Stan 9 years ago.
Updated Patch → I misunderstood what you meant.
3531 - Fix DISABLE_PATHFINDER option.patch (1.1 KB ) - added by Stan 9 years ago.
Rename it to long pathfinder as the short one isn't affected.

Download all attachments as: .zip

Change History (9)

by Stan, 9 years ago

Easy fix for it by removing the last reference.

comment:1 by Stan, 9 years ago

Keywords: review patch added
Owner: set to Stan
Status: newassigned
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 elexis, 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 Stan, 9 years ago

Updated Patch → I misunderstood what you meant.

comment:3 by elexis, 9 years ago

Keywords: review added
Milestone: BacklogAlpha 20

comment:4 by Itms, 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 Stan, 9 years ago

Rename it to long pathfinder as the short one isn't affected.

comment:5 by mimo, 9 years ago

Resolution: fixed
Status: assignedclosed

In 17137:

fix a moved function, fixes #3531

comment:6 by mimo, 9 years ago

Keywords: review removed
Milestone: Alpha 20Alpha 19
Note: See TracTickets for help on using tickets.