Browse Source

path_get_node1 cleanup

pull/876/head^2
qndel 6 years ago committed by Anders Jenbo
parent
commit
77c64b99d5
  1. 7
      Source/path.cpp

7
Source/path.cpp

@ -269,9 +269,12 @@ BOOL path_parent_path(PATHNODE *pPath, int dx, int dy, int sx, int sy)
PATHNODE *path_get_node1(int dx, int dy)
{
PATHNODE *result = path_2_nodes->NextNode;
while (result != NULL && (result->x != dx || result->y != dy))
while (result != NULL) {
if (result->x == dx && result->y == dy)
return result;
result = result->NextNode;
return result;
}
return NULL;
}
/**

Loading…
Cancel
Save