You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
18
18
19
19
<details><summary><b>Fixed</b></summary>
20
20
21
+
- Reverted a change to pathfinding, that although was technically accurate, caused issues with the AI being too eager to path up-and-over obstacles instead of through them. In the future this will likely be revisited when we get jump-aware pathfinding.
int status = this->CalculatePath(start, end, request.path, request.totalCost, digStrength);
218
+
int status = this->CalculatePath(start, end, request.path, request.totalCost, digStrength);
218
219
219
-
request.status = status;
220
-
request.pathLength = request.path.size();
220
+
request.status = status;
221
+
request.pathLength = request.path.size();
221
222
222
-
if (callback) {
223
-
callback(volRequest);
224
-
}
223
+
if (callback) {
224
+
callback(volRequest);
225
+
}
225
226
226
-
// Have to set to complete after the callback, so anything that blocks on it knows that the callback will have been called by now
227
-
// This has the awkward side-effect that the complete flag is actually false during the callback - but that's fine, if it's called we know it's complete anyways
228
-
request.complete = true;
229
-
},
230
-
pathRequest);
227
+
// Have to set to complete after the callback, so anything that blocks on it knows that the callback will have been called by now
228
+
// This has the awkward side-effect that the complete flag is actually false during the callback - but that's fine, if it's called we know it's complete anyways
229
+
request.complete = true;
230
+
},
231
+
pathRequest);
231
232
232
233
return pathRequest;
233
234
}
@@ -279,7 +280,11 @@ std::vector<int> PathFinder::RecalculateAreaCosts(std::deque<Box>& boxList, int
// Now, it's technically correct to divide this by NodeDimension in order to not get an extreme overestimate of cost (by a factor of 20!)
284
+
// But... turns out doing so actually makes pathfinding worse, because it encourages taking the cheapest path up and around obstable instead of straight through them
285
+
// This is a combination of no jump-aware pathing and material transition cost balancing
if (node->LeftUp && node->LeftUp->m_Navigatable) {
336
347
adjCost.cost = 1.4F + extraUpCost + (GetMaterialTransitionCost(*node->LeftUpMaterial) * 1.4F * 3.0F) + radiatedCost; // Three times more expensive when digging.
0 commit comments