From e0cd19c0111d6e156685c6511aba24455263076a Mon Sep 17 00:00:00 2001 From: KPhoenix <68359262+kphoenix137@users.noreply.github.com> Date: Sat, 15 Jan 2022 16:36:09 -0500 Subject: [PATCH] Fix death animation frames for Warrior/Barbarian (#3954) --- Source/player.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/player.cpp b/Source/player.cpp index 4cc3730a8..4e808b1ab 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -2436,6 +2436,7 @@ void SetPlrAnims(Player &player) player._pSFNum = PlrGFXAnimLens[static_cast(pc)][10]; auto gn = static_cast(player._pgfxnum & 0xF); + int armorGraphicIndex = player._pgfxnum & ~0xF; if (pc == HeroClass::Warrior) { if (gn == PlayerWeaponGraphic::Bow) { if (leveltype != DTYPE_TOWN) { @@ -2449,6 +2450,8 @@ void SetPlrAnims(Player &player) player._pAFrames = 16; player._pAFNum = 11; } + if (armorGraphicIndex > 0) + player._pDFrames = 15; } else if (pc == HeroClass::Rogue) { if (gn == PlayerWeaponGraphic::Axe) { player._pAFrames = 22; @@ -2520,6 +2523,8 @@ void SetPlrAnims(Player &player) } else if (gn == PlayerWeaponGraphic::Mace || gn == PlayerWeaponGraphic::MaceShield) { player._pAFNum = 8; } + if (armorGraphicIndex > 0) + player._pDFrames = 15; } }