mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-04 21:40:03 +00:00
fixed randomness
This commit is contained in:
parent
de83ad0116
commit
ee2f3db9a8
@ -255,7 +255,7 @@ void CharacterController::refreshHitRecoilAnims()
|
||||
&& mAnimation->hasAnimation("knockout"))
|
||||
{
|
||||
mTimeToWake = time(NULL);
|
||||
mTimeToWake += rand() % 2 + 1; // Wake up after 1 to 3 seconds
|
||||
mTimeToWake += (int)( (float)rand() / (float)RAND_MAX * 2) + 1; // Wake up after 1 to 3 seconds
|
||||
if (isSwimming && mAnimation->hasAnimation("swimknockout"))
|
||||
{
|
||||
mHitState = CharState_SwimKnockOut;
|
||||
|
Loading…
x
Reference in New Issue
Block a user