mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-28 22:39:40 +00:00
[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::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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue