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
This commit is contained in:
Flugente
2014-03-18 21:08:17 +00:00
parent c45b5aa7f6
commit 85b582ed89
+3 -7
View File
@@ -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);