From 85b582ed897c78e9307aa0da01eb44fe77056487 Mon Sep 17 00:00:00 2001 From: Flugente Date: Tue, 18 Mar 2014 21:08:17 +0000 Subject: [PATCH] Merged revision(s) 7086 from branches/ja2_source_official_2014: Fix: using hip-firing mode resulted in no item values used from either the gun or most attachments git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7087 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Items.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Tactical/Items.cpp b/Tactical/Items.cpp index c107d3522..30b0c4d22 100644 --- a/Tactical/Items.cpp +++ b/Tactical/Items.cpp @@ -10269,6 +10269,9 @@ INT32 GetObjectModifier( SOLDIERTYPE* pSoldier, OBJECTTYPE *pObj, UINT8 ubStance if (pObj->exists() ) { + // simply add the object modifier + iModifier += GetItemModifier( pObj, ubRef, usType); + for (attachmentList::iterator iter = (*pObj)[0]->attachments.begin(); iter != (*pObj)[0]->attachments.end(); ++iter) { if( iter->exists() ) @@ -10295,15 +10298,8 @@ INT32 GetObjectModifier( SOLDIERTYPE* pSoldier, OBJECTTYPE *pObj, UINT8 ubStance // Do not apply weapon bonus/penalty because this will be added one step below. We don't want to apply it twice. if ( pObj->usItem != ObjList[pSoldier->bScopeMode]->usItem ) iModifier += GetItemModifier(ObjList[pSoldier->bScopeMode], ubRef, usType); - // add weapon modifier - iModifier += GetItemModifier( pObj, ubRef, usType); } } - else - { - // simply add the object modifier - iModifier += GetItemModifier( pObj, ubRef, usType); - } } iModifier = __max(-100,iModifier);