mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
- 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:
@@ -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 );
|
||||
}
|
||||
Reference in New Issue
Block a user