We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents faec07d + 7f7d5e2 commit 116a2c0Copy full SHA for 116a2c0
libopenage/pathfinding/pathfinder.cpp
@@ -231,8 +231,7 @@ const Pathfinder::portal_star_t Pathfinder::portal_a_star(const PathRequest &req
231
auto portal_pos = portal->get_exit_center(start_sector->get_id());
232
auto portal_abs_pos = sector_pos + portal_pos;
233
auto heuristic_cost = Pathfinder::heuristic_cost(portal_abs_pos, request.target);
234
-
235
- portal_node->current_cost = 0;
+ portal_node->current_cost = Pathfinder::heuristic_cost(portal_abs_pos, request.start);
236
portal_node->heuristic_cost = heuristic_cost;
237
portal_node->future_cost = portal_node->current_cost + heuristic_cost;
238
0 commit comments