mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Load the lowest faction reaction for every faction
This commit is contained in:
parent
773d78192c
commit
10f1e9a4e0
2 changed files with 7 additions and 1 deletions
|
@ -57,7 +57,12 @@ namespace ESM
|
|||
ESM::RefId faction = esm.getRefId();
|
||||
int reaction;
|
||||
esm.getHNT(reaction, "INTV");
|
||||
mReactions[faction] = reaction;
|
||||
// Prefer the lowest reaction in case a faction is listed multiple times
|
||||
auto it = mReactions.find(faction);
|
||||
if (it == mReactions.end())
|
||||
mReactions.emplace(faction, reaction);
|
||||
else if (it->second > reaction)
|
||||
it->second = reaction;
|
||||
break;
|
||||
}
|
||||
case SREC_DELE:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue