From 8f949c6ae217c662e61f926fda0c5f9812b7fe09 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sat, 8 Feb 2014 07:35:34 +0100 Subject: [PATCH] Fix lockpicks --- apps/openmw/mwrender/npcanimation.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwrender/npcanimation.cpp b/apps/openmw/mwrender/npcanimation.cpp index bcbcbc737e..d07aad31d4 100644 --- a/apps/openmw/mwrender/npcanimation.cpp +++ b/apps/openmw/mwrender/npcanimation.cpp @@ -697,7 +697,8 @@ void NpcAnimation::showWeapons(bool showWeapon) addOrReplaceIndividualPart(ESM::PRT_Weapon, MWWorld::InventoryStore::Slot_CarriedRight, 1, mesh, !weapon->getClass().getEnchantment(*weapon).empty(), &glowColor); - if (weapon->get()->mBase->mData.mType == ESM::Weapon::MarksmanCrossbow) + if (weapon->getTypeName() == typeid(ESM::Weapon).name() && + weapon->get()->mBase->mData.mType == ESM::Weapon::MarksmanCrossbow) { MWWorld::ContainerStoreIterator ammo = inv.getSlot(MWWorld::InventoryStore::Slot_Ammunition); if (ammo != inv.end() && ammo->get()->mBase->mData.mType == ESM::Weapon::Bolt)