Fix death animation frames for Warrior/Barbarian (#3954)

This commit is contained in:
KPhoenix 2022-01-15 16:36:09 -05:00 committed by GitHub
commit e0cd19c011
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2436,6 +2436,7 @@ void SetPlrAnims(Player &player)
player._pSFNum = PlrGFXAnimLens[static_cast<std::size_t>(pc)][10];
auto gn = static_cast<PlayerWeaponGraphic>(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;
}
}