1 parent 9a5e355 commit d011028Copy full SHA for d011028
1 file changed
rcbot2/bot_navmesh.cpp
@@ -1336,7 +1336,7 @@ void CNavMeshNavigator::updatePosition()
1336
1337
float score = clear;
1338
if (hasFloor) score += 2.0f;
1339
- if (score > bestScore) { bestScore = score; bestDir = i; }
+ if (score > bestScore || (score == bestScore && randomInt(0, 1) == 0)) { bestScore = score; bestDir = i; }
1340
m_tnClearance[i] = clear;
1341
m_tnHasFloor[i] = hasFloor;
1342
}
0 commit comments