forked from teamnwah/openmw-tes3coop
Fix torch animation playing when torch is hidden (Fixes #2236)
This commit is contained in:
parent
377b79d5ba
commit
1bd3ab8a2d
2 changed files with 2 additions and 2 deletions
|
@ -1285,7 +1285,7 @@ bool CharacterController::updateWeaponState()
|
||||||
|
|
||||||
MWWorld::ContainerStoreIterator torch = inv.getSlot(MWWorld::InventoryStore::Slot_CarriedLeft);
|
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()
|
||||||
&& mWeaponType != WeapType_Spell && mWeaponType != WeapType_HandToHand)
|
&& updateCarriedLeftVisible(mWeaponType))
|
||||||
|
|
||||||
{
|
{
|
||||||
mAnimation->play("torch", Priority_Torch, MWRender::Animation::Group_LeftArm,
|
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);
|
mAnimation->play(mCurrentAnimGroup, 1, Animation::Group_All, false, 1.0f, "start", "stop", 0.0f, 0);
|
||||||
|
|
||||||
MWWorld::ContainerStoreIterator torch = inv.getSlot(MWWorld::InventoryStore::Slot_CarriedLeft);
|
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"))
|
if(!mAnimation->getInfo("torch"))
|
||||||
mAnimation->play("torch", 2, MWRender::Animation::Group_LeftArm, false,
|
mAnimation->play("torch", 2, MWRender::Animation::Group_LeftArm, false,
|
||||||
|
|
Loading…
Reference in a new issue