mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-14 10:20:05 +00:00
Fix path matching breaking prematurely
This commit is contained in:
parent
d41122157f
commit
ebd3b7b75a
@ -45,8 +45,10 @@ static NPCPath* findApplicablePath(int32_t id, int32_t type) {
|
|||||||
for (auto _path = Transport::NPCPaths.begin(); _path != Transport::NPCPaths.end(); _path++) {
|
for (auto _path = Transport::NPCPaths.begin(); _path != Transport::NPCPaths.end(); _path++) {
|
||||||
// search target IDs
|
// search target IDs
|
||||||
for (int32_t pID : _path->targetIDs) {
|
for (int32_t pID : _path->targetIDs) {
|
||||||
if (id == pID) match = &(*_path);
|
if (id == pID) {
|
||||||
break;
|
match = &(*_path);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (match != nullptr)
|
if (match != nullptr)
|
||||||
@ -54,8 +56,10 @@ static NPCPath* findApplicablePath(int32_t id, int32_t type) {
|
|||||||
|
|
||||||
// search target types
|
// search target types
|
||||||
for (int32_t pType : _path->targetTypes) {
|
for (int32_t pType : _path->targetTypes) {
|
||||||
if (type == pType) match = &(*_path);
|
if (type == pType) {
|
||||||
break;
|
match = &(*_path);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (match != nullptr)
|
if (match != nullptr)
|
||||||
|
Loading…
Reference in New Issue
Block a user