1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-04 02:15:34 +00:00

corrected chance

This commit is contained in:
scrawl 2012-10-19 19:48:54 +02:00
parent d76522e7a4
commit 8d7514e341

View file

@ -474,7 +474,7 @@ MWMechanics::Alchemy::Result MWMechanics::Alchemy::create (const std::string& na
if (beginEffects()==endEffects()) if (beginEffects()==endEffects())
return Result_NoEffects; return Result_NoEffects;
if (getChance()<std::rand()/static_cast<double> (RAND_MAX)) if (getChance()<std::rand()/static_cast<double> (RAND_MAX)*100)
{ {
removeIngredients(); removeIngredients();
return Result_RandomFailure; return Result_RandomFailure;