Fix shield displaying on inventory avatar (bug #4720)

pull/541/head
Andrei Kortunov 6 years ago
parent a354879477
commit 7438e20ee1

@ -6,6 +6,7 @@
Bug #4701: PrisonMarker record is not hardcoded like other markers Bug #4701: PrisonMarker record is not hardcoded like other markers
Bug #4714: Crash upon game load in the repair menu while the "Your repair failed!" message is active Bug #4714: Crash upon game load in the repair menu while the "Your repair failed!" message is active
Bug #4715: "Cannot get class of an empty object" exception after pressing ESC in the dialogue mode Bug #4715: "Cannot get class of an empty object" exception after pressing ESC in the dialogue mode
Bug #4720: Inventory avatar has shield with two-handed weapon during [un]equipping animation
Feature #2229: Improve pathfinding AI Feature #2229: Improve pathfinding AI
Feature #3442: Default values for fallbacks from ini file Feature #3442: Default values for fallbacks from ini file
Feature #4673: Weapon sheathing Feature #4673: Weapon sheathing

@ -305,24 +305,37 @@ namespace MWRender
type == ESM::Weapon::LongBladeOneHand || type == ESM::Weapon::LongBladeOneHand ||
type == ESM::Weapon::BluntOneHand || type == ESM::Weapon::BluntOneHand ||
type == ESM::Weapon::AxeOneHand || type == ESM::Weapon::AxeOneHand ||
type == ESM::Weapon::MarksmanThrown || type == ESM::Weapon::MarksmanThrown)
type == ESM::Weapon::MarksmanCrossbow || {
type == ESM::Weapon::MarksmanBow) groupname = "inventoryweapononehand";
}
else if(type == ESM::Weapon::MarksmanCrossbow ||
type == ESM::Weapon::MarksmanBow)
{
groupname = "inventoryweapononehand"; groupname = "inventoryweapononehand";
showCarriedLeft = false;
}
else if(type == ESM::Weapon::LongBladeTwoHand || else if(type == ESM::Weapon::LongBladeTwoHand ||
type == ESM::Weapon::BluntTwoClose || type == ESM::Weapon::BluntTwoClose ||
type == ESM::Weapon::AxeTwoHand) type == ESM::Weapon::AxeTwoHand)
{
groupname = "inventoryweapontwohand"; groupname = "inventoryweapontwohand";
showCarriedLeft = false;
}
else if(type == ESM::Weapon::BluntTwoWide || else if(type == ESM::Weapon::BluntTwoWide ||
type == ESM::Weapon::SpearTwoWide) type == ESM::Weapon::SpearTwoWide)
{
groupname = "inventoryweapontwowide"; groupname = "inventoryweapontwowide";
showCarriedLeft = false;
}
else else
{
groupname = "inventoryhandtohand"; groupname = "inventoryhandtohand";
showCarriedLeft = false;
showCarriedLeft = (iter->getClass().canBeEquipped(*iter, mCharacter).first != 2); }
} }
else else
groupname = "inventoryhandtohand"; groupname = "inventoryhandtohand";
} }
mAnimation->showCarriedLeft(showCarriedLeft); mAnimation->showCarriedLeft(showCarriedLeft);

Loading…
Cancel
Save