1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 15:29:55 +00:00

Merge branch 'censusinfighting' into 'master'

Load the lowest faction reaction for every faction

Closes #7553

See merge request OpenMW/openmw!3376
This commit is contained in:
Alexei Kotov 2023-08-26 15:42:48 +00:00
commit 102826ddb6
2 changed files with 7 additions and 1 deletions

View file

@ -69,6 +69,7 @@
Bug #7459: Icons get stacked on the cursor when picking up multiple items simultaneously Bug #7459: Icons get stacked on the cursor when picking up multiple items simultaneously
Bug #7472: Crash when enchanting last projectiles Bug #7472: Crash when enchanting last projectiles
Bug #7505: Distant terrain does not support sample size greater than cell size Bug #7505: Distant terrain does not support sample size greater than cell size
Bug #7553: Faction reaction loading is incorrect
Feature #3537: Shader-based water ripples Feature #3537: Shader-based water ripples
Feature #5492: Let rain and snow collide with statics Feature #5492: Let rain and snow collide with statics
Feature #6447: Add LOD support to Object Paging Feature #6447: Add LOD support to Object Paging

View file

@ -57,7 +57,12 @@ namespace ESM
ESM::RefId faction = esm.getRefId(); ESM::RefId faction = esm.getRefId();
int reaction; int reaction;
esm.getHNT(reaction, "INTV"); 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; break;
} }
case SREC_DELE: case SREC_DELE: