From 39b8911803663d53d284a49427534fc2323247da Mon Sep 17 00:00:00 2001 From: Sevenfm Date: Sat, 15 May 2021 06:26:37 +0000 Subject: [PATCH] Fix: attaching guns to tripwire. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9027 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Items.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Tactical/Items.cpp b/Tactical/Items.cpp index 647439af..636de6a3 100644 --- a/Tactical/Items.cpp +++ b/Tactical/Items.cpp @@ -2294,8 +2294,10 @@ BOOLEAN ValidAttachment( UINT16 usAttachment, OBJECTTYPE * pObj, UINT8 * pubAPCo if ( !pObj->exists() ) return FALSE; - // shadooow: efficiency check, we are passing all kinds of items into this function that are not neccessary attachments at all - if (!Item[usAttachment].attachment && !Item[usAttachment].hiddenaddon) + // shadooow: efficiency check, we are passing all kinds of items into this function that are not necessary attachments at all + if (!Item[usAttachment].attachment && + !Item[usAttachment].hiddenaddon && + !((Item[usAttachment].usItemClass & IC_GUN) && Item[pObj->usItem].tripwire)) return FALSE; if( UsingNewAttachmentSystem() )