mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Fix Attachable Launchers Slot Tooltips
fix: launchables made valid by attached launchers are now again shown as tooltip and can be attached to slot with click fixes https://github.com/1dot13/source/issues/298
This commit is contained in:
@@ -5769,14 +5769,6 @@ void UpdateAttachmentTooltips(OBJECTTYPE *pObject, UINT8 ubStatusIndex)
|
||||
//search primary item launchables.xml
|
||||
usAttachment = Launchable[usLoop][0];
|
||||
}
|
||||
|
||||
if (usAttachment > 0 && !Item[usAttachment].hiddenaddon && !Item[usAttachment].hiddenattachment && ItemIsLegal(usAttachment))
|
||||
{
|
||||
if (std::find(attachList.begin(), attachList.end(), usAttachment) == attachList.end())
|
||||
{
|
||||
attachList.push_back(usAttachment);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//search for launchables made valid by other attachments
|
||||
@@ -5785,11 +5777,22 @@ void UpdateAttachmentTooltips(OBJECTTYPE *pObject, UINT8 ubStatusIndex)
|
||||
while (cnt)
|
||||
{
|
||||
if (Launchable[usLoop][1] == *p && AttachmentSlots[usLoopSlotID].nasAttachmentClass & Item[Launchable[usLoop][0]].nasAttachmentClass)
|
||||
{
|
||||
usAttachment = Launchable[usLoop][0];
|
||||
break;
|
||||
}
|
||||
|
||||
cnt--, p++;
|
||||
}
|
||||
}
|
||||
|
||||
if (usAttachment > 0 && !Item[usAttachment].hiddenaddon && !Item[usAttachment].hiddenattachment && ItemIsLegal(usAttachment))
|
||||
{
|
||||
if (std::find(attachList.begin(), attachList.end(), usAttachment) == attachList.end())
|
||||
{
|
||||
attachList.push_back(usAttachment);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// check all attachments
|
||||
|
||||
Reference in New Issue
Block a user