forked from mirror/openmw-tes3mp
Various integer/floating point roll adjustments based on wiki
This commit is contained in:
parent
58a2ad663c
commit
5abeab21ed
5 changed files with 5 additions and 5 deletions
|
@ -251,7 +251,7 @@ namespace MWClass
|
|||
|
||||
float hitchance = MWMechanics::getHitChance(ptr, victim, ref->mBase->mData.mCombat);
|
||||
|
||||
if(OEngine::Misc::Rng::rollProbability() >= hitchance/100.0f)
|
||||
if(OEngine::Misc::Rng::roll0to99() >= hitchance)
|
||||
{
|
||||
victim.getClass().onHit(victim, 0.0f, false, MWWorld::Ptr(), ptr, false);
|
||||
MWMechanics::reduceWeaponCondition(0.f, false, weapon, ptr);
|
||||
|
|
|
@ -515,7 +515,7 @@ namespace MWClass
|
|||
|
||||
float hitchance = MWMechanics::getHitChance(ptr, victim, ptr.getClass().getSkill(ptr, weapskill));
|
||||
|
||||
if (OEngine::Misc::Rng::rollProbability() >= hitchance / 100.0f)
|
||||
if (OEngine::Misc::Rng::roll0to99() >= hitchance)
|
||||
{
|
||||
othercls.onHit(victim, 0.0f, false, weapon, ptr, false);
|
||||
MWMechanics::reduceWeaponCondition(0.f, false, weapon, ptr);
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace MWGui
|
|||
{
|
||||
for (size_t i = 0; i<mSourceModel->getItemCount(); ++i)
|
||||
{
|
||||
if (chance <= OEngine::Misc::Rng::roll0to99())
|
||||
if (OEngine::Misc::Rng::roll0to99() > chance)
|
||||
mHiddenItems.push_back(mSourceModel->getItem(i));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -187,7 +187,7 @@ namespace MWMechanics
|
|||
int skillValue = attacker.getClass().getSkill(attacker,
|
||||
weapon.getClass().getEquipmentSkill(weapon));
|
||||
|
||||
if (OEngine::Misc::Rng::rollProbability() >= getHitChance(attacker, victim, skillValue) / 100.0f)
|
||||
if (OEngine::Misc::Rng::roll0to99() >= getHitChance(attacker, victim, skillValue))
|
||||
{
|
||||
victim.getClass().onHit(victim, 0.0f, false, projectile, attacker, false);
|
||||
MWMechanics::reduceWeaponCondition(0.f, false, weapon, attacker);
|
||||
|
|
|
@ -737,7 +737,7 @@ namespace MWMechanics
|
|||
float x = 0;
|
||||
float y = 0;
|
||||
|
||||
float roll = OEngine::Misc::Rng::rollClosedProbability() * 100;
|
||||
int roll = OEngine::Misc::Rng::roll0to99();
|
||||
|
||||
if (type == PT_Admire)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue