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++) {
|
||||
// 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)
|
||||
|
Loading…
Reference in New Issue
Block a user