1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-05 15:40:10 +00:00

Merge remote-tracking branch 'origin/openmw-32' into openmw-32

This commit is contained in:
Marc Zinnschlag 2014-08-29 10:03:56 +02:00
commit 8f336dfedd
3 changed files with 16 additions and 10 deletions

View File

@ -770,7 +770,7 @@ void getMinMaxAttackDuration(const MWWorld::Ptr& actor, float (*fMinMaxDurations
// get weapon information: type and speed // get weapon information: type and speed
const ESM::Weapon *weapon = NULL; const ESM::Weapon *weapon = NULL;
MWMechanics::WeaponType weaptype; MWMechanics::WeaponType weaptype = MWMechanics::WeapType_None;
MWWorld::ContainerStoreIterator weaponSlot = MWWorld::ContainerStoreIterator weaponSlot =
MWMechanics::getActiveWeapon(actor.getClass().getCreatureStats(actor), actor.getClass().getInventoryStore(actor), &weaptype); MWMechanics::getActiveWeapon(actor.getClass().getCreatureStats(actor), actor.getClass().getInventoryStore(actor), &weaptype);

View File

@ -870,10 +870,16 @@ bool CharacterController::updateWeaponState()
mAnimation->addEffect("meshes\\" + castStatic->mModel, effect->mIndex); mAnimation->addEffect("meshes\\" + castStatic->mModel, effect->mIndex);
castStatic = MWBase::Environment::get().getWorld()->getStore().get<ESM::Static>().find ("VFX_Hands"); castStatic = MWBase::Environment::get().getWorld()->getStore().get<ESM::Static>().find ("VFX_Hands");
//mAnimation->addEffect("meshes\\" + castStatic->mModel, -1, false, "Bip01 L Hand", effect->mParticle); if (mAnimation->getNode("Left Hand"))
//mAnimation->addEffect("meshes\\" + castStatic->mModel, -1, false, "Bip01 R Hand", effect->mParticle); {
mAnimation->addEffect("meshes\\" + castStatic->mModel, -1, false, "Left Hand", effect->mParticle); mAnimation->addEffect("meshes\\" + castStatic->mModel, -1, false, "Left Hand", effect->mParticle);
mAnimation->addEffect("meshes\\" + castStatic->mModel, -1, false, "Right Hand", effect->mParticle); mAnimation->addEffect("meshes\\" + castStatic->mModel, -1, false, "Right Hand", effect->mParticle);
}
else
{
mAnimation->addEffect("meshes\\" + castStatic->mModel, -1, false, "Bip01 L Hand", effect->mParticle);
mAnimation->addEffect("meshes\\" + castStatic->mModel, -1, false, "Bip01 R Hand", effect->mParticle);
}
switch(effectentry.mRange) switch(effectentry.mRange)
{ {

View File

@ -490,7 +490,7 @@ int MWWorld::InventoryStore::remove(const Ptr& item, int count, const Ptr& actor
} }
if (item.getRefData().getCount() == 0 && mSelectedEnchantItem != end() if (item.getRefData().getCount() == 0 && mSelectedEnchantItem != end()
&& *mSelectedEnchantItem == item && actor.getRefData().getHandle() == "player") && *mSelectedEnchantItem == item)
{ {
mSelectedEnchantItem = end(); mSelectedEnchantItem = end();
} }
@ -521,11 +521,11 @@ MWWorld::ContainerStoreIterator MWWorld::InventoryStore::unequipSlot(int slot, c
const std::string& script = it->getClass().getScript(*it); const std::string& script = it->getClass().getScript(*it);
if (script != "") if (script != "")
(*it).getRefData().getLocals().setVarByInt(script, "onpcequip", 0); (*it).getRefData().getLocals().setVarByInt(script, "onpcequip", 0);
}
if ((mSelectedEnchantItem != end()) && (mSelectedEnchantItem == it)) if ((mSelectedEnchantItem != end()) && (mSelectedEnchantItem == it))
{ {
mSelectedEnchantItem = end(); mSelectedEnchantItem = end();
}
} }
} }