Skip to content

Commit

Permalink
Update libopenage/pathfinding/cost_field.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: Christoph Heine <6852422+heinezen@users.noreply.github.com>
  • Loading branch information
dmwever and heinezen authored Jan 29, 2025
1 parent b94092d commit 6f1eaeb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libopenage/pathfinding/cost_field.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ void CostField::set_costs(std::vector<cost_t> &&cells, const time::time_t &valid
}

bool CostField::stamp(size_t idx, cost_t cost, const time::time_t &stamped_at) {
if (this->cost_stamps[idx].has_value()) return false;
if (this->cost_stamps[idx].has_value()) {
return false;
}

cost_t original_cost = this->get_cost(idx);
this->cost_stamps[idx]->original_cost = original_cost;
Expand Down

0 comments on commit 6f1eaeb

Please sign in to comment.