forked from mirror/openmw-tes3mp
[Client] Don't cast non-weapons to weapons in isUsingRangedWeapon()
This makes lockpicks and probes work again.
This commit is contained in:
parent
292536439e
commit
e402a17757
1 changed files with 1 additions and 1 deletions
|
@ -83,7 +83,7 @@ bool MechanicsHelper::isUsingRangedWeapon(const MWWorld::Ptr& ptr)
|
||||||
MWWorld::ContainerStoreIterator weaponSlot = inventoryStore.getSlot(
|
MWWorld::ContainerStoreIterator weaponSlot = inventoryStore.getSlot(
|
||||||
MWWorld::InventoryStore::Slot_CarriedRight);
|
MWWorld::InventoryStore::Slot_CarriedRight);
|
||||||
|
|
||||||
if (weaponSlot != inventoryStore.end())
|
if (weaponSlot != inventoryStore.end() && weaponSlot->getTypeName() == typeid(ESM::Weapon).name())
|
||||||
{
|
{
|
||||||
const ESM::Weapon* weaponRecord = weaponSlot->get<ESM::Weapon>()->mBase;
|
const ESM::Weapon* weaponRecord = weaponSlot->get<ESM::Weapon>()->mBase;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue