Skip to content

Commit

Permalink
Fixed compilation with visual studio
Browse files Browse the repository at this point in the history
Follow up to 0da7136.
Fixes # 1254.
  • Loading branch information
Lemongrass3110 committed May 8, 2016
1 parent b556d20 commit c4390e5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/map/path.c
Expand Up @@ -325,11 +325,6 @@ bool path_search(struct walkpath_data *wpd, int16 m, int16 x0, int16 y0, int16 x

return false; // easy path unsuccessful
} else { // !(flag&1)
// A* (A-star) pathfinding
// We always use A* for finding walkpaths because it is what game client uses.
// Easy pathfinding cuts corners of non-walkable cells, but client always walks around it.
BHEAP_RESET(g_open_set);

// FIXME: This array is too small to ensure all paths shorter than MAX_WALKPATH
// can be found without node collision: calc_index(node1) = calc_index(node2).
// Figure out more proper size or another way to keep track of known nodes.
Expand All @@ -340,6 +335,11 @@ bool path_search(struct walkpath_data *wpd, int16 m, int16 x0, int16 y0, int16 x
int len = 0;
int j;

// A* (A-star) pathfinding
// We always use A* for finding walkpaths because it is what game client uses.
// Easy pathfinding cuts corners of non-walkable cells, but client always walks around it.
BHEAP_RESET(g_open_set);

memset(tp, 0, sizeof(tp));

// Start node
Expand Down

3 comments on commit c4390e5

@wilkemeyer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which Platform Toolset / VS Version caused the issue ?

@Lemongrass3110
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any platform and version I tried. It is a normal VS problem that you did something before declaring the variables of the scope.

@aleos89
Copy link
Contributor

@aleos89 aleos89 commented on c4390e5 May 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Odd, I had no issues on VS13.

Please sign in to comment.