From 85e8d5ff987636cbc42e738058957f7e594db55c Mon Sep 17 00:00:00 2001 From: MS Date: Thu, 1 Jan 2026 13:57:08 -0500 Subject: [PATCH] Match SearchForSection (#539) --- src/DETHRACE/common/opponent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DETHRACE/common/opponent.c b/src/DETHRACE/common/opponent.c index 26f2d3cb..dd85e406 100644 --- a/src/DETHRACE/common/opponent.c +++ b/src/DETHRACE/common/opponent.c @@ -697,7 +697,7 @@ int SearchForSection(tRoute_section* pTemp_store, tRoute_section* pPerm_store, i pTemp_store[pDepth].section_no = section_no; pTemp_store[pDepth].direction = direction; distance_so_far = gProgram_state.AI_vehicles.path_sections[section_no].length + pDistance_so_far; - if (pTarget_section == section_no && distance_so_far <= shortest_dist) { + if (pTarget_section == section_no && distance_so_far < shortest_dist) { shortest_dist = distance_so_far; *pNum_of_perm_store_sections = pDepth + 1; memcpy(pPerm_store, pTemp_store, sizeof(tRoute_section) * *pNum_of_perm_store_sections);