- changed MAX_PERCENT_NOISE_VOLUME_FOR_SILENCED_SOUND from 35 to 50 so that all shots with silencers use the silenced sound instead of the normal weapons sound

- New item tag <SleepModifier>:
This is a percentage bonus to breath regain while resting.
It could be applied to sleeping bags for example.
Reasonable values are from 0 (no bonus) to 100 (twice the regeneration).

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6483 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
silversurfer
2013-10-12 15:02:10 +00:00
parent f72e4424eb
commit c5873e956d
6 changed files with 62 additions and 24 deletions
+15
View File
@@ -15257,3 +15257,18 @@ INT32 GetPercentRangeBonus( OBJECTTYPE * pObj )
return( bonus );
}
// silversurfer: Finds items with SleepModifier bonus in inventory and returns the highest value
UINT8 GetInventorySleepModifier( SOLDIERTYPE *pSoldier )
{
UINT8 modifier = 0;
for ( UINT8 i = 0; i < pSoldier->inv.size(); i++ )
{
if( pSoldier->inv[ i ].exists() == true && Item[ pSoldier->inv[i].usItem ].ubSleepModifier > 0 )
{
modifier = __max(modifier, BonusReduce( Item[ pSoldier->inv[i].usItem ].ubSleepModifier, pSoldier->inv[i][0]->data.objectStatus ));
}
}
return( modifier );
}