mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-03 06:33:14 +00:00
Fix shadowed declaration in pathfind code
This commit is contained in:
parent
7d17046942
commit
376f4d3116
1 changed files with 11 additions and 11 deletions
|
|
@ -484,24 +484,24 @@ boolean K_PathfindAStar(path_t *const path, pathfindsetup_t *const pathfindsetup
|
||||||
// Need to update pointers in closedset, openset, and node "camefrom" if nodesarray moved.
|
// Need to update pointers in closedset, openset, and node "camefrom" if nodesarray moved.
|
||||||
if (nodesarray != nodesarrayrealloc)
|
if (nodesarray != nodesarrayrealloc)
|
||||||
{
|
{
|
||||||
size_t i = 0U;
|
size_t j = 0U;
|
||||||
size_t arrayindex = 0U;
|
size_t arrayindex = 0U;
|
||||||
for (i = 0U; i < closedsetcount; i++)
|
for (j = 0U; j < closedsetcount; j++)
|
||||||
{
|
{
|
||||||
arrayindex = closedset[i] - nodesarray;
|
arrayindex = closedset[j] - nodesarray;
|
||||||
closedset[i] = &nodesarrayrealloc[arrayindex];
|
closedset[j] = &nodesarrayrealloc[arrayindex];
|
||||||
}
|
}
|
||||||
for (i = 0U; i < openset.count; i++)
|
for (j = 0U; j < openset.count; j++)
|
||||||
{
|
{
|
||||||
arrayindex = ((pathfindnode_t *)(openset.array[i].data)) - nodesarray;
|
arrayindex = ((pathfindnode_t *)(openset.array[j].data)) - nodesarray;
|
||||||
openset.array[i].data = &nodesarrayrealloc[arrayindex];
|
openset.array[j].data = &nodesarrayrealloc[arrayindex];
|
||||||
}
|
}
|
||||||
for (i = 0U; i < nodesarraycount; i++)
|
for (j = 0U; j < nodesarraycount; j++)
|
||||||
{
|
{
|
||||||
if (nodesarrayrealloc[i].camefrom != NULL)
|
if (nodesarrayrealloc[j].camefrom != NULL)
|
||||||
{
|
{
|
||||||
arrayindex = nodesarrayrealloc[i].camefrom - nodesarray;
|
arrayindex = nodesarrayrealloc[j].camefrom - nodesarray;
|
||||||
nodesarrayrealloc[i].camefrom = &nodesarrayrealloc[arrayindex];
|
nodesarrayrealloc[j].camefrom = &nodesarrayrealloc[arrayindex];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue