mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-09 12:42:11 +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;
|
||||
else
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user