Cap reputation values (bug #5226)

pull/2630/head
Andrei Kortunov 4 years ago
parent 150a1e735f
commit 3d9c42e8ee

@ -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

@ -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

Loading…
Cancel
Save