1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 13:53:53 +00:00

Merge pull request #1685

This commit is contained in:
scrawl 2018-04-22 15:34:31 +00:00
commit d8d26f1de8
No known key found for this signature in database
GPG key ID: 2E6CC3676024C402
2 changed files with 2 additions and 2 deletions

View file

@ -286,7 +286,7 @@ void CharacterController::refreshHitRecoilAnims()
} }
else if (recovery) else if (recovery)
{ {
std::string anim = isSwimming ? chooseRandomGroup("swimhit") : chooseRandomGroup("hit"); std::string anim = chooseRandomGroup("swimhit");
if (isSwimming && mAnimation->hasAnimation(anim)) if (isSwimming && mAnimation->hasAnimation(anim))
{ {
mHitState = CharState_SwimHit; mHitState = CharState_SwimHit;

View file

@ -25,7 +25,7 @@ namespace Misc
int Rng::rollDice(int max) 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;
} }
} }