1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-29 09:32:45 +00:00

Cap reputation values (bug #5226)

This commit is contained in:
Andrei Kortunov 2019-12-11 08:47:46 +04:00
parent 150a1e735f
commit 3d9c42e8ee
2 changed files with 3 additions and 1 deletions

View File

@ -181,6 +181,7 @@
Bug #5218: Crash when disabling ToggleBorders
Bug #5220: GetLOS crashes when actor isn't loaded
Bug #5222: Empty cell name subrecords are not saved
Bug #5226: Reputation should be capped
Feature #1774: Handle AvoidNode
Feature #2229: Improve pathfinding AI
Feature #3025: Analogue gamepad movement controls

View File

@ -370,7 +370,8 @@ int MWMechanics::NpcStats::getReputation() const
void MWMechanics::NpcStats::setReputation(int reputation)
{
mReputation = reputation;
// Reputation is capped in original engine
mReputation = std::min(255, std::max(0, reputation));
}
int MWMechanics::NpcStats::getCrimeId() const