1
0
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:
Marc Zinnschlag 2012-05-19 14:43:02 +02:00
parent 74ae3605e0
commit 635a89c35c

View File

@ -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);
}