skip randomization when min>=max
This commit is contained in:
parent
08791dd6c2
commit
72ac4bb345
@ -64,7 +64,7 @@ namespace cheat::feature
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ConfigWidget("Min Multiplier", f_minMultiplier, 1, 2, 1000, "Attack count minimum multiplier.");
|
ConfigWidget("Min Multiplier", f_minMultiplier, 1, 1, 1000, "Attack count minimum multiplier.");
|
||||||
ConfigWidget("Max Multiplier", f_maxMultiplier, 1, 2, 1000, "Attack count maximum multiplier.");
|
ConfigWidget("Max Multiplier", f_maxMultiplier, 1, 2, 1000, "Attack count maximum multiplier.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -157,6 +157,9 @@ namespace cheat::feature
|
|||||||
}
|
}
|
||||||
if (f_Randomize)
|
if (f_Randomize)
|
||||||
{
|
{
|
||||||
|
if (f_minMultiplier.value() >= f_maxMultiplier.value())
|
||||||
|
countOfAttacks = f_minMultiplier.value();
|
||||||
|
else
|
||||||
countOfAttacks = rand() % (f_maxMultiplier.value() - f_minMultiplier.value()) + f_minMultiplier.value();
|
countOfAttacks = rand() % (f_maxMultiplier.value() - f_minMultiplier.value()) + f_minMultiplier.value();
|
||||||
return countOfAttacks;
|
return countOfAttacks;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user