From e6c0e187bcd1614294bdfac84e53f33b707aa878 Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 2 Jan 2014 15:42:57 +0100 Subject: [PATCH 1/4] Closes #1073: Check for all gold types in canSell. For containers, only gold_001 is relevant, but items in the world can be sold as well. --- apps/openmw/mwclass/misc.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwclass/misc.cpp b/apps/openmw/mwclass/misc.cpp index 5e216fed4a..d211891035 100644 --- a/apps/openmw/mwclass/misc.cpp +++ b/apps/openmw/mwclass/misc.cpp @@ -242,7 +242,11 @@ namespace MWClass item.get(); return !ref->mBase->mData.mIsKey && (npcServices & ESM::NPC::Misc) - && !Misc::StringUtils::ciEqual(item.getCellRef().mRefID, "gold_001"); + && !Misc::StringUtils::ciEqual(item.getCellRef().mRefID, "gold_001") + && !Misc::StringUtils::ciEqual(item.getCellRef().mRefID, "gold_005") + && !Misc::StringUtils::ciEqual(item.getCellRef().mRefID, "gold_010") + && !Misc::StringUtils::ciEqual(item.getCellRef().mRefID, "gold_025") + && !Misc::StringUtils::ciEqual(item.getCellRef().mRefID, "gold_100"); } float Miscellaneous::getWeight(const MWWorld::Ptr &ptr) const From 0990ca4b75fa4dba73f72cbd14742415ee259ff4 Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 2 Jan 2014 15:58:00 +0100 Subject: [PATCH 2/4] Closes #1072: Fix extra light being added multiple times when showCarriedLeft(true) is called repeatedly --- apps/openmw/mwrender/npcanimation.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/openmw/mwrender/npcanimation.cpp b/apps/openmw/mwrender/npcanimation.cpp index ddbdde83a6..b1455f0dc6 100644 --- a/apps/openmw/mwrender/npcanimation.cpp +++ b/apps/openmw/mwrender/npcanimation.cpp @@ -664,11 +664,12 @@ void NpcAnimation::showCarriedLeft(bool show) { Ogre::Vector3 glowColor = getEnchantmentColor(*iter); std::string mesh = MWWorld::Class::get(*iter).getModel(*iter); - addOrReplaceIndividualPart(ESM::PRT_Shield, MWWorld::InventoryStore::Slot_CarriedLeft, 1, - mesh, !iter->getClass().getEnchantment(*iter).empty(), &glowColor); - - if (iter->getTypeName() == typeid(ESM::Light).name()) - addExtraLight(mInsert->getCreator(), mObjectParts[ESM::PRT_Shield], iter->get()->mBase); + if (addOrReplaceIndividualPart(ESM::PRT_Shield, MWWorld::InventoryStore::Slot_CarriedLeft, 1, + mesh, !iter->getClass().getEnchantment(*iter).empty(), &glowColor)) + { + if (iter->getTypeName() == typeid(ESM::Light).name()) + addExtraLight(mInsert->getCreator(), mObjectParts[ESM::PRT_Shield], iter->get()->mBase); + } } else removeIndividualPart(ESM::PRT_Shield); From 12de351febd378fdb453f99bf0f49607898cce17 Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 2 Jan 2014 16:38:23 +0100 Subject: [PATCH 3/4] Check if levitation is enabled before levitating --- apps/openmw/mwclass/npc.cpp | 3 ++- apps/openmw/mwworld/worldimp.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp index 2ba0566dd9..f4e15423d3 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -848,7 +848,8 @@ namespace MWClass float moveSpeed; if(normalizedEncumbrance >= 1.0f) moveSpeed = 0.0f; - else if(mageffects.get(MWMechanics::EffectKey(10/*levitate*/)).mMagnitude > 0) + else if(mageffects.get(MWMechanics::EffectKey(10/*levitate*/)).mMagnitude > 0 && + world->isLevitationEnabled()) { float flySpeed = 0.01f*(npcdata->mNpcStats.getAttribute(ESM::Attribute::Speed).getModified() + mageffects.get(MWMechanics::EffectKey(10/*levitate*/)).mMagnitude); diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index d02e1022e7..148c8f3016 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -1606,7 +1606,8 @@ namespace MWWorld return false; const MWMechanics::CreatureStats &stats = ptr.getClass().getCreatureStats(ptr); - if(stats.getMagicEffects().get(MWMechanics::EffectKey(ESM::MagicEffect::Levitate)).mMagnitude > 0) + if(stats.getMagicEffects().get(MWMechanics::EffectKey(ESM::MagicEffect::Levitate)).mMagnitude > 0 + && isLevitationEnabled()) return true; // TODO: Check if flying creature From 29acc3f72290a152be14ae6760b39f401dd9c81d Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 2 Jan 2014 16:56:31 +0100 Subject: [PATCH 4/4] Fix particles being too small. Looks like this should actually be size*2. --- components/nifogre/ogrenifloader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/nifogre/ogrenifloader.cpp b/components/nifogre/ogrenifloader.cpp index 5f9674c91e..63e9057664 100644 --- a/components/nifogre/ogrenifloader.cpp +++ b/components/nifogre/ogrenifloader.cpp @@ -854,7 +854,7 @@ class NIFObjectLoader { const Nif::NiParticleSystemController *partctrl = static_cast(ctrl.getPtr()); - partsys->setDefaultDimensions(partctrl->size, partctrl->size); + partsys->setDefaultDimensions(partctrl->size*2, partctrl->size*2); if(!partctrl->emitter.empty()) {