mirror of
https://github.com/1dot13/source.git
synced 2026-08-19 14:20:30 +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:
@@ -1160,6 +1160,9 @@ typedef struct
|
||||
// Flugente: item is connected to another item. Type of connection depends on item specifics
|
||||
UINT16 usBuddyItem;
|
||||
|
||||
// silversurfer: item provides breath regeneration bonus while resting
|
||||
UINT8 ubSleepModifier;
|
||||
|
||||
} INVTYPE;
|
||||
|
||||
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
@@ -520,6 +520,9 @@ BOOLEAN ItemCanBeAppliedToOthers( UINT16 usItem );
|
||||
//zwwooooo - IoV: change RangeBonus to ratable (Orange by kenkenkenken in IoV921)
|
||||
INT32 GetPercentRangeBonus( OBJECTTYPE * pObj );
|
||||
|
||||
// silversurfer: returns the SleepModifier from the characters inventory
|
||||
UINT8 GetInventorySleepModifier( SOLDIERTYPE *pSoldier );
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ void HandleTacticalEffectsOfEquipmentChange( SOLDIERTYPE *pSoldier, UINT32 uiInv
|
||||
#define SOLID_SLUG_RANGE_BONUS 65
|
||||
#define DUCKBILL_RANGE_BONUS 40
|
||||
|
||||
#define MAX_PERCENT_NOISE_VOLUME_FOR_SILENCED_SOUND 35
|
||||
#define MAX_PERCENT_NOISE_VOLUME_FOR_SILENCED_SOUND 50 //35 silversurfer changed that to make sound suppressors always play the silenced sound
|
||||
|
||||
// JA2 GOLD: for weapons and attachments, give penalties only for status values below 85
|
||||
#define WEAPON_STATUS_MOD( x ) ( (x) >= 85 ? 100 : (((x) * 100) / 85) )
|
||||
|
||||
Reference in New Issue
Block a user