mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 03:35:27 +00:00
Avoid potential zero division
This commit is contained in:
parent
58bd35c70d
commit
2965373ed6
@ -52,7 +52,10 @@ namespace MWMechanics
|
||||
{
|
||||
static const float fAIMeleeWeaponMult = gmst.find("fAIMeleeWeaponMult")->mValue.getFloat();
|
||||
static const float fAIRangeMeleeWeaponMult = gmst.find("fAIRangeMeleeWeaponMult")->mValue.getFloat();
|
||||
rangedMult = fAIRangeMeleeWeaponMult / fAIMeleeWeaponMult;
|
||||
if (fAIMeleeWeaponMult != 0)
|
||||
rangedMult = fAIRangeMeleeWeaponMult / fAIMeleeWeaponMult;
|
||||
else
|
||||
rangedMult = fAIRangeMeleeWeaponMult;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user