mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-14 15:40:18 +00:00
Invalid iterator fix
This commit is contained in:
parent
2e623bac5a
commit
1a98f8ca93
@ -289,7 +289,7 @@ namespace MWMechanics
|
||||
|
||||
// FIXME: consider moving this stuff to ActionWeapon::getCombatRange
|
||||
const ESM::Weapon *weapon = NULL;
|
||||
MWMechanics::WeaponType weaptype;
|
||||
MWMechanics::WeaponType weaptype = WeapType_None;
|
||||
float weapRange = 1.0f;
|
||||
|
||||
// Get weapon characteristics
|
||||
@ -308,7 +308,7 @@ namespace MWMechanics
|
||||
world->getStore().get<ESM::GameSetting>().find("fHandToHandReach")->getFloat();
|
||||
weapRange = fHandToHandReach;
|
||||
}
|
||||
else if (weaptype != WeapType_PickProbe && weaptype != WeapType_Spell)
|
||||
else if (weaptype != WeapType_PickProbe && weaptype != WeapType_Spell && weaptype != WeapType_None)
|
||||
{
|
||||
// All other WeapTypes are actually weapons, so get<ESM::Weapon> is safe.
|
||||
weapon = weaponSlot->get<ESM::Weapon>()->mBase;
|
||||
|
Loading…
x
Reference in New Issue
Block a user