Browse Source

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

pull/3955/head
KPhoenix 4 years ago committed by GitHub
parent
commit
e0cd19c011
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      Source/player.cpp

5
Source/player.cpp

@ -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;
}
}

Loading…
Cancel
Save