mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
-fixed integral bipods not working properly
-changed "bipod" tag in items.xml from a boolean to an integer. It is now the to-hit bonus for the bipod. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@439 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" };
|
||||
#else
|
||||
|
||||
//RELEASE BUILD VERSION
|
||||
INT16 zVersionLabel[256] = { L"Release v1.13.438" };
|
||||
INT16 zVersionLabel[256] = { L"Release v1.13.439" };
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -312,7 +312,7 @@ typedef struct
|
||||
BOOLEAN lockbomb;
|
||||
BOOLEAN flare;
|
||||
INT16 percentnoisereduction;
|
||||
BOOLEAN bipod;
|
||||
INT16 bipod;
|
||||
INT16 tohitbonus;
|
||||
INT16 bestlaserrange;
|
||||
INT16 rangebonus;
|
||||
|
||||
+25
-11
@@ -6214,14 +6214,18 @@ INT16 GetToHitBonus( OBJECTTYPE * pObj, INT32 iRange, UINT8 bLightLevel, BOOLEAN
|
||||
|
||||
// Snap: bipod is effective only in the prone stance
|
||||
|
||||
if ( ! Item[pObj->usItem].bipod || fProneStance )
|
||||
bns = BonusReduceMore( LaserBonus( &Item[pObj->usItem], iRange, bLightLevel), pObj->bStatus[0] );
|
||||
if ( fProneStance )
|
||||
bns += Item[pObj->usItem].bipod;
|
||||
|
||||
bns += BonusReduceMore( LaserBonus( &Item[pObj->usItem], iRange, bLightLevel), pObj->bStatus[0] );
|
||||
bns += Item[pObj->usGunAmmoItem].tohitbonus;
|
||||
|
||||
for (int i = 0; i < MAX_ATTACHMENTS; i++)
|
||||
{
|
||||
if ( ! Item[pObj->usAttachItem[i]].bipod || fProneStance )
|
||||
bns += BonusReduceMore( LaserBonus( &Item[pObj->usAttachItem[i]], iRange, bLightLevel), pObj->bAttachStatus[i] );
|
||||
if ( fProneStance )
|
||||
bns += Item[pObj->usAttachItem[i]].bipod;
|
||||
|
||||
bns += BonusReduceMore( LaserBonus( &Item[pObj->usAttachItem[i]], iRange, bLightLevel), pObj->bAttachStatus[i] );
|
||||
}
|
||||
|
||||
// Snap (TODO): add special treatment of laser scopes
|
||||
@@ -6234,14 +6238,18 @@ INT16 GetBurstToHitBonus( OBJECTTYPE * pObj, BOOLEAN fProneStance )
|
||||
|
||||
// Snap: bipod is effective only in the prone stance
|
||||
|
||||
if ( ! Item[pObj->usItem].bipod || fProneStance )
|
||||
bns = BonusReduceMore( Item[pObj->usItem].bursttohitbonus, pObj->bStatus[0] );
|
||||
if ( fProneStance )
|
||||
bns += Item[pObj->usItem].bipod;
|
||||
|
||||
bns += BonusReduceMore( Item[pObj->usItem].bursttohitbonus, pObj->bStatus[0] );
|
||||
bns += Item[pObj->usGunAmmoItem].bursttohitbonus ;
|
||||
|
||||
for (int i = 0; i < MAX_ATTACHMENTS; i++)
|
||||
{
|
||||
if ( ! Item[pObj->usAttachItem[i]].bipod || fProneStance )
|
||||
bns += BonusReduceMore( Item[pObj->usAttachItem[i]].bursttohitbonus, pObj->bAttachStatus[i] );
|
||||
if ( fProneStance )
|
||||
bns += Item[pObj->usAttachItem[i]].bipod;
|
||||
|
||||
bns += BonusReduceMore( Item[pObj->usAttachItem[i]].bursttohitbonus, pObj->bAttachStatus[i] );
|
||||
}
|
||||
|
||||
return( bns );
|
||||
@@ -6354,13 +6362,19 @@ INT16 GetAutoToHitBonus( OBJECTTYPE * pObj, BOOLEAN fProneStance )
|
||||
|
||||
// Snap: bipod is effective only in the prone stance
|
||||
|
||||
if ( ! Item[pObj->usItem].bipod || fProneStance )
|
||||
bns = BonusReduceMore( Item[pObj->usItem].autofiretohitbonus, pObj->bStatus[0] );
|
||||
if ( fProneStance )
|
||||
bns += Item[pObj->usItem].bipod;
|
||||
|
||||
|
||||
bns += BonusReduceMore( Item[pObj->usItem].autofiretohitbonus, pObj->bStatus[0] );
|
||||
|
||||
bns += Item[pObj->usGunAmmoItem].autofiretohitbonus ;
|
||||
|
||||
for (int i = 0; i < MAX_ATTACHMENTS; i++)
|
||||
{
|
||||
if ( ! Item[pObj->usAttachItem[i]].bipod || fProneStance )
|
||||
if ( fProneStance )
|
||||
bns += Item[pObj->usAttachItem[i]].bipod;
|
||||
|
||||
bns += BonusReduceMore( Item[pObj->usAttachItem[i]].autofiretohitbonus, pObj->bAttachStatus[i] );
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -565,7 +565,7 @@ itemEndElementHandle(void *userData, const char *name)
|
||||
else if(strcmp(name, "Bipod") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.bipod = (BOOLEAN) atol(pData->szCharData);
|
||||
pData->curItem.bipod = (INT16) atol(pData->szCharData);
|
||||
}
|
||||
else if(strcmp(name, "ToHitBonus") == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user