From 268b7cd6fc3a5f9e6281ba6627be735a461a8665 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sun, 15 Apr 2012 22:05:33 +0200 Subject: [PATCH] replaced typename checks --- apps/openmw/mwrender/npcanimation.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/openmw/mwrender/npcanimation.cpp b/apps/openmw/mwrender/npcanimation.cpp index 9cc3c26f6..0f25a1ff4 100644 --- a/apps/openmw/mwrender/npcanimation.cpp +++ b/apps/openmw/mwrender/npcanimation.cpp @@ -308,12 +308,12 @@ void NpcAnimation::updateParts(){ } if(!isBeast && boots != inv.end()){ - if(boots->getTypeName() == "struct ESM::Clothing"){ + if(boots->getTypeName() == typeid(ESM::Clothing).name()){ const ESM::Clothing *clothes = (boots->get())->base; std::vector parts = clothes->parts.parts; addPartGroup(MWWorld::InventoryStore::Slot_Boots, 2, parts); } - else + else if(boots->getTypeName() == typeid(ESM::Armor).name()) { const ESM::Armor *armor = (boots->get())->base; std::vector parts = armor->parts.parts; @@ -323,7 +323,7 @@ void NpcAnimation::updateParts(){ } if(leftglove != inv.end()){ - if(leftglove->getTypeName() == "struct ESM::Clothing"){ + if(leftglove->getTypeName() == typeid(ESM::Clothing).name()){ const ESM::Clothing *clothes = (leftglove->get())->base; std::vector parts = clothes->parts.parts; addPartGroup(MWWorld::InventoryStore::Slot_LeftGauntlet, 2, parts); @@ -338,7 +338,7 @@ void NpcAnimation::updateParts(){ } if(rightglove != inv.end()){ - if(rightglove->getTypeName() == "struct ESM::Clothing"){ + if(rightglove->getTypeName() == typeid(ESM::Clothing).name()){ const ESM::Clothing *clothes = (rightglove->get())->base; std::vector parts = clothes->parts.parts; addPartGroup(MWWorld::InventoryStore::Slot_RightGauntlet, 2, parts);