mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-12 13:13:27 +00:00
Reset player attack animation when unequip weapon or tool
This commit is contained in:
parent
a5b01fefec
commit
7f5f5458d4
@ -23,6 +23,7 @@
|
||||
#include "../mwworld/esmstore.hpp"
|
||||
#include "../mwworld/inventorystore.hpp"
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwworld/player.hpp"
|
||||
|
||||
#include "../mwmechanics/npcstats.hpp"
|
||||
#include "../mwmechanics/actorutil.hpp"
|
||||
@ -919,6 +920,9 @@ void NpcAnimation::showWeapons(bool showWeapon)
|
||||
else
|
||||
{
|
||||
removeIndividualPart(ESM::PRT_Weapon);
|
||||
// If we remove/hide weapon from player, we should reset attack animation as well
|
||||
if (mPtr == MWMechanics::getPlayer())
|
||||
MWBase::Environment::get().getWorld()->getPlayer().setAttackingOrSpell(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user