Fixed compilation with visual studio

Follow up to 0da7136.
Fixes # 1254.
This commit is contained in:
Lemongrass3110 2016-05-08 17:18:30 +02:00
parent b556d20ff6
commit c4390e58d5

View File

@ -325,11 +325,6 @@ bool path_search(struct walkpath_data *wpd, int16 m, int16 x0, int16 y0, int16 x
return false; // easy path unsuccessful return false; // easy path unsuccessful
} else { // !(flag&1) } 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 // 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). // 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. // Figure out more proper size or another way to keep track of known nodes.
@ -340,6 +335,11 @@ bool path_search(struct walkpath_data *wpd, int16 m, int16 x0, int16 y0, int16 x
int len = 0; int len = 0;
int j; 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)); memset(tp, 0, sizeof(tp));
// Start node // Start node