From ebd3b7b75ae25459305778ad599b36032e792913 Mon Sep 17 00:00:00 2001 From: gsemaj Date: Wed, 5 May 2021 14:59:24 -0400 Subject: [PATCH] Fix path matching breaking prematurely --- src/TableData.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/TableData.cpp b/src/TableData.cpp index 64c4d0d..b16160a 100644 --- a/src/TableData.cpp +++ b/src/TableData.cpp @@ -45,8 +45,10 @@ static NPCPath* findApplicablePath(int32_t id, int32_t type) { for (auto _path = Transport::NPCPaths.begin(); _path != Transport::NPCPaths.end(); _path++) { // search target IDs for (int32_t pID : _path->targetIDs) { - if (id == pID) match = &(*_path); - break; + if (id == pID) { + match = &(*_path); + break; + } } if (match != nullptr) @@ -54,8 +56,10 @@ static NPCPath* findApplicablePath(int32_t id, int32_t type) { // search target types for (int32_t pType : _path->targetTypes) { - if (type == pType) match = &(*_path); - break; + if (type == pType) { + match = &(*_path); + break; + } } if (match != nullptr)