mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-29 21:45:32 +00:00
Unset DrawState_Spell when becoming a werewolf
This commit is contained in:
parent
f052c05018
commit
6b67911658
1 changed files with 9 additions and 6 deletions
|
@ -1607,15 +1607,18 @@ namespace MWMechanics
|
|||
player->restoreSkillsAttributes();
|
||||
}
|
||||
|
||||
npcStats.setWerewolf(werewolf);
|
||||
|
||||
// This is a bit dangerous. Equipped items other than WerewolfRobe may reference
|
||||
// bones that do not even exist with the werewolf object root.
|
||||
// Therefore, make sure to unequip everything at once, and only fire the change event
|
||||
// (which will rebuild the animation parts) afterwards. unequipAll will do this for us.
|
||||
// Equipped items other than WerewolfRobe may reference bones that do not even
|
||||
// exist with the werewolf object root, so make sure to unequip all items
|
||||
// *before* we become a werewolf.
|
||||
MWWorld::InventoryStore& invStore = actor.getClass().getInventoryStore(actor);
|
||||
invStore.unequipAll(actor);
|
||||
|
||||
// Werewolfs can not cast spells, so we need to unset the prepared spell if there is one.
|
||||
if (npcStats.getDrawState() == MWMechanics::DrawState_Spell)
|
||||
npcStats.setDrawState(MWMechanics::DrawState_Nothing);
|
||||
|
||||
npcStats.setWerewolf(werewolf);
|
||||
|
||||
if(werewolf)
|
||||
{
|
||||
MWWorld::InventoryStore &inv = actor.getClass().getInventoryStore(actor);
|
||||
|
|
Loading…
Reference in a new issue