mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 06:35:30 +00:00
Issue #256: RNG fix
This commit is contained in:
parent
74ae3605e0
commit
635a89c35c
@ -79,7 +79,8 @@ namespace MWMechanics
|
|||||||
param.mMagnitude = iter->magnMin;
|
param.mMagnitude = iter->magnMin;
|
||||||
else
|
else
|
||||||
param.mMagnitude = static_cast<int> (
|
param.mMagnitude = static_cast<int> (
|
||||||
(iter->magnMax-iter->magnMin+1)*(std::rand() / RAND_MAX) + iter->magnMin);
|
(iter->magnMax-iter->magnMin+1)*
|
||||||
|
(static_cast<float> (std::rand()) / RAND_MAX) + iter->magnMin);
|
||||||
|
|
||||||
add (*iter, param);
|
add (*iter, param);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user