path_get_node1 cleanup
This commit is contained in:
parent
bec59ba793
commit
77c64b99d5
1 changed files with 5 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue