- fix pathfind bug causing cop path not straight enough

This commit is contained in:
Ilya Shurumov 2022-11-15 14:49:44 +06:00
parent e0874de48f
commit 6a2db421b0

View File

@ -583,7 +583,7 @@ int iterate(void)
}
else
{
//if (dist <= itHere.dist - 288)
if (dist <= itHere.dist - 288)
{
nbr->dist = 1;
}
@ -957,7 +957,7 @@ void UpdateCopMap(void)
{
if (!iterate())
{
pathFrames = -1;
pathFrames = 0;
break;
}
}
@ -967,7 +967,8 @@ void UpdateCopMap(void)
// remove cars
addCivs();
}
else
if(pathFrames == 0)
{
// restart from new search target position
if (player[0].playerType == 1 && (CopsCanSeePlayer != 0 || numActiveCops == 0))