Fix torch animation playing when torch is hidden (Fixes #2236)

moveref
scrawl 10 years ago
parent 377b79d5ba
commit 1bd3ab8a2d

@ -1285,7 +1285,7 @@ bool CharacterController::updateWeaponState()
MWWorld::ContainerStoreIterator torch = inv.getSlot(MWWorld::InventoryStore::Slot_CarriedLeft);
if(torch != inv.end() && torch->getTypeName() == typeid(ESM::Light).name()
&& mWeaponType != WeapType_Spell && mWeaponType != WeapType_HandToHand)
&& updateCarriedLeftVisible(mWeaponType))
{
mAnimation->play("torch", Priority_Torch, MWRender::Animation::Group_LeftArm,

@ -239,7 +239,7 @@ namespace MWRender
mAnimation->play(mCurrentAnimGroup, 1, Animation::Group_All, false, 1.0f, "start", "stop", 0.0f, 0);
MWWorld::ContainerStoreIterator torch = inv.getSlot(MWWorld::InventoryStore::Slot_CarriedLeft);
if(torch != inv.end() && torch->getTypeName() == typeid(ESM::Light).name())
if(torch != inv.end() && torch->getTypeName() == typeid(ESM::Light).name() && showCarriedLeft)
{
if(!mAnimation->getInfo("torch"))
mAnimation->play("torch", 2, MWRender::Animation::Group_LeftArm, false,

Loading…
Cancel
Save