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
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