bool CUIActorMenu::highlight_addons_for_weapon( PIItem weapon_item, CUICellItem* ci ) { PIItem item = (PIItem)ci->m_pData; if ( !item ) { return false; } CScope* pScope = smart_cast<CScope*>(item); if ( pScope && weapon_item->CanAttach(pScope) ) { ci->m_select_armament = true; return true; } CSilencer* pSilencer = smart_cast<CSilencer*>(item); if ( pSilencer && weapon_item->CanAttach(pSilencer) ) { ci->m_select_armament = true; return true; } CGrenadeLauncher* pGrenadeLauncher = smart_cast<CGrenadeLauncher*>(item); if ( pGrenadeLauncher && weapon_item->CanAttach(pGrenadeLauncher) ) { ci->m_select_armament = true; return true; } return false; }