1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-20 05:23:51 +00:00

Make creatures use fHandToHandReach

This commit is contained in:
Allofich 2016-09-11 00:00:12 +09:00
parent c98d4e0473
commit 3f6543860a

View file

@ -490,19 +490,11 @@ namespace MWMechanics
static const float fCombatDistance = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().find("fCombatDistance")->getFloat(); static const float fCombatDistance = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().find("fCombatDistance")->getFloat();
if (mWeapon.isEmpty()) if (mWeapon.isEmpty())
{
if (!mIsNpc)
{
return fCombatDistance;
}
else
{ {
static float fHandToHandReach = static float fHandToHandReach =
MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().find("fHandToHandReach")->getFloat(); MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().find("fHandToHandReach")->getFloat();
return fHandToHandReach * fCombatDistance; return fHandToHandReach * fCombatDistance;
} }
}
const ESM::Weapon* weapon = mWeapon.get<ESM::Weapon>()->mBase; const ESM::Weapon* weapon = mWeapon.get<ESM::Weapon>()->mBase;