Skip to content

Commit

Permalink
xrGame/ui/UIActorMenu.cpp: added monster info to the inventory window (
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Oct 16, 2021
1 parent 2f9bbe5 commit 670632a
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/xrGame/ui/UIActorMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,21 @@ void CUIActorMenu::InitPartnerInfo()
{
if (m_pPartnerInvOwner)
{
if (m_pPartnerInvOwner->use_simplified_visual())
CBaseMonster* monster = smart_cast<CBaseMonster*>(m_pPartnerInvOwner);
if (monster || m_pPartnerInvOwner->use_simplified_visual())
{
GetModeSpecificPartnerInfo(m_currMenuMode)->ClearInfo();
if (monster)
{
shared_str monster_tex_name = pSettings->r_string(monster->cNameSect(), "icon");
GetModeSpecificPartnerInfo(m_currMenuMode)->UIIcon().InitTexture(monster_tex_name.c_str());
GetModeSpecificPartnerInfo(m_currMenuMode)->UIIcon().SetStretchTexture(true);
}
}
else
{
GetModeSpecificPartnerInfo(m_currMenuMode)->InitCharacter(m_pPartnerInvOwner->object_id());
}

SetInvBox(nullptr);
}
Expand Down

0 comments on commit 670632a

Please sign in to comment.