mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 13:15:32 +00:00
Allow scripted faction leaving using PCLowerRank (feature #5036)
This commit is contained in:
parent
8920b34b75
commit
555e43855d
2 changed files with 4 additions and 1 deletions
|
@ -115,6 +115,7 @@
|
||||||
Feature #5010: Native graphics herbalism support
|
Feature #5010: Native graphics herbalism support
|
||||||
Feature #5031: Make GetWeaponType function return different values for tools
|
Feature #5031: Make GetWeaponType function return different values for tools
|
||||||
Feature #5033: Magic armor mitigation for creatures
|
Feature #5033: Magic armor mitigation for creatures
|
||||||
|
Feature #5036: Allow scripted faction leaving
|
||||||
Task #4686: Upgrade media decoder to a more current FFmpeg API
|
Task #4686: Upgrade media decoder to a more current FFmpeg API
|
||||||
Task #4695: Optimize Distant Terrain memory consumption
|
Task #4695: Optimize Distant Terrain memory consumption
|
||||||
Task #4721: Add NMake support to the Windows prebuild script
|
Task #4721: Add NMake support to the Windows prebuild script
|
||||||
|
|
|
@ -85,7 +85,9 @@ void MWMechanics::NpcStats::lowerRank(const std::string &faction)
|
||||||
std::map<std::string, int>::iterator it = mFactionRank.find(lower);
|
std::map<std::string, int>::iterator it = mFactionRank.find(lower);
|
||||||
if (it != mFactionRank.end())
|
if (it != mFactionRank.end())
|
||||||
{
|
{
|
||||||
it->second = std::max(0, it->second-1);
|
it->second = it->second-1;
|
||||||
|
if (it->second < 0)
|
||||||
|
mFactionRank.erase(it);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue