1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 21:53:51 +00:00

Merge remote-tracking branch 'scrawl/master' into openmw-28

This commit is contained in:
Marc Zinnschlag 2014-01-02 19:52:47 +01:00
commit 5d3b696eb6
5 changed files with 16 additions and 9 deletions

View file

@ -242,7 +242,11 @@ namespace MWClass
item.get<ESM::Miscellaneous>(); item.get<ESM::Miscellaneous>();
return !ref->mBase->mData.mIsKey && (npcServices & ESM::NPC::Misc) 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 float Miscellaneous::getWeight(const MWWorld::Ptr &ptr) const

View file

@ -848,7 +848,8 @@ namespace MWClass
float moveSpeed; float moveSpeed;
if(normalizedEncumbrance >= 1.0f) if(normalizedEncumbrance >= 1.0f)
moveSpeed = 0.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() + float flySpeed = 0.01f*(npcdata->mNpcStats.getAttribute(ESM::Attribute::Speed).getModified() +
mageffects.get(MWMechanics::EffectKey(10/*levitate*/)).mMagnitude); mageffects.get(MWMechanics::EffectKey(10/*levitate*/)).mMagnitude);

View file

@ -664,11 +664,12 @@ void NpcAnimation::showCarriedLeft(bool show)
{ {
Ogre::Vector3 glowColor = getEnchantmentColor(*iter); Ogre::Vector3 glowColor = getEnchantmentColor(*iter);
std::string mesh = MWWorld::Class::get(*iter).getModel(*iter); std::string mesh = MWWorld::Class::get(*iter).getModel(*iter);
addOrReplaceIndividualPart(ESM::PRT_Shield, MWWorld::InventoryStore::Slot_CarriedLeft, 1, if (addOrReplaceIndividualPart(ESM::PRT_Shield, MWWorld::InventoryStore::Slot_CarriedLeft, 1,
mesh, !iter->getClass().getEnchantment(*iter).empty(), &glowColor); mesh, !iter->getClass().getEnchantment(*iter).empty(), &glowColor))
{
if (iter->getTypeName() == typeid(ESM::Light).name()) if (iter->getTypeName() == typeid(ESM::Light).name())
addExtraLight(mInsert->getCreator(), mObjectParts[ESM::PRT_Shield], iter->get<ESM::Light>()->mBase); addExtraLight(mInsert->getCreator(), mObjectParts[ESM::PRT_Shield], iter->get<ESM::Light>()->mBase);
}
} }
else else
removeIndividualPart(ESM::PRT_Shield); removeIndividualPart(ESM::PRT_Shield);

View file

@ -1606,7 +1606,8 @@ namespace MWWorld
return false; return false;
const MWMechanics::CreatureStats &stats = ptr.getClass().getCreatureStats(ptr); 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; return true;
// TODO: Check if flying creature // TODO: Check if flying creature

View file

@ -854,7 +854,7 @@ class NIFObjectLoader
{ {
const Nif::NiParticleSystemController *partctrl = static_cast<const Nif::NiParticleSystemController*>(ctrl.getPtr()); const Nif::NiParticleSystemController *partctrl = static_cast<const Nif::NiParticleSystemController*>(ctrl.getPtr());
partsys->setDefaultDimensions(partctrl->size, partctrl->size); partsys->setDefaultDimensions(partctrl->size*2, partctrl->size*2);
if(!partctrl->emitter.empty()) if(!partctrl->emitter.empty())
{ {