mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-06 00:55:50 +00:00
Merge pull request #1685
This commit is contained in:
commit
d8d26f1de8
@ -286,7 +286,7 @@ void CharacterController::refreshHitRecoilAnims()
|
||||
}
|
||||
else if (recovery)
|
||||
{
|
||||
std::string anim = isSwimming ? chooseRandomGroup("swimhit") : chooseRandomGroup("hit");
|
||||
std::string anim = chooseRandomGroup("swimhit");
|
||||
if (isSwimming && mAnimation->hasAnimation(anim))
|
||||
{
|
||||
mHitState = CharState_SwimHit;
|
||||
|
@ -25,7 +25,7 @@ namespace Misc
|
||||
|
||||
int Rng::rollDice(int max)
|
||||
{
|
||||
return std::uniform_int_distribution<int>(0, max - 1)(generator);
|
||||
return max > 0 ? std::uniform_int_distribution<int>(0, max - 1)(generator) : 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user