2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 23:47:43 +00:00

Implement CWarWasp

This commit is contained in:
Jack Andersen
2019-01-15 18:22:44 -10:00
parent f9b0614327
commit 851e113dc0
27 changed files with 1473 additions and 146 deletions

View File

@@ -306,7 +306,7 @@ bool CPathFindSearch::Search(rstl::reserved_vector<CPFRegion*, 4>& regs1, const
/* Next G */
float g = (linkReg->GetCentroid() - reg->GetCentroid()).magnitude() + reg->Data()->GetG();
if ((!x0_area->ClosedSet().Test(linkReg->GetIndex()) && !x0_area->OpenList().Test(linkReg)) ||
linkReg->Data()->GetG() <= g) {
linkReg->Data()->GetG() > g) {
if (x0_area->OpenList().Test(linkReg)) {
/* In rare cases, revisiting a region will yield a lower G (actual cost) */
x0_area->OpenList().Pop(linkReg);