mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-12-23 03:40:05 +00:00
Prioritize ID match over type match when finding a path for an NPC
This commit is contained in:
parent
72b62cd5a4
commit
c393bf7af2
@ -49,6 +49,9 @@ static NPCPath* findApplicablePath(int32_t id, int32_t type) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (match != nullptr)
|
||||
break; // early break for ID matches, since ID has higher priority than type
|
||||
|
||||
// search target types
|
||||
for (int32_t pType : _path->targetTypes) {
|
||||
if (type == pType) match = &(*_path);
|
||||
|
Loading…
Reference in New Issue
Block a user