@@ -14375,31 +14375,33 @@ int CTFPlayer::GiveAmmo( int iCount, int iAmmoIndex, bool bSuppressSound, EAmmoS
14375
14375
// ammo.
14376
14376
if ( iAmmoIndex != TF_AMMO_METAL )
14377
14377
{
14378
- //int iAmmoBecomesHealth = 0;
14379
- //CALL_ATTRIB_HOOK_INT( iAmmoBecomesHealth, ammo_becomes_health );
14380
- //if ( iAmmoBecomesHealth == 1 )
14381
- //{
14382
- // // Ammo from ground pickups is converted to health.
14383
- // if ( eAmmoSource == kAmmoSource_Pickup )
14384
- // {
14385
- // int iTakenHealth = TakeHealth( iCount, DMG_GENERIC );
14386
- // if ( iTakenHealth > 0 )
14387
- // {
14388
- // if ( !bSuppressSound )
14389
- // {
14390
- // EmitSound( "BaseCombatCharacter.AmmoPickup" );
14391
- // }
14392
- // m_Shared.HealthKitPickupEffects( iCount );
14393
- // }
14394
- // return iTakenHealth;
14395
- // }
14396
-
14397
- // // Ammo from the cart or engineer dispensers is flatly ignored.
14398
- // if ( eAmmoSource == kAmmoSource_DispenserOrCart )
14399
- // return 0;
14400
-
14401
- // Assert( eAmmoSource == kAmmoSource_Resupply );
14402
- //}
14378
+ #ifdef BDSBASE
14379
+ int iAmmoBecomesHealth = 0;
14380
+ CALL_ATTRIB_HOOK_INT( iAmmoBecomesHealth, ammo_becomes_health );
14381
+ if ( iAmmoBecomesHealth == 1 )
14382
+ {
14383
+ // Ammo from ground pickups is converted to health.
14384
+ if ( eAmmoSource == kAmmoSource_Pickup )
14385
+ {
14386
+ int iTakenHealth = TakeHealth( iCount, DMG_GENERIC );
14387
+ if ( iTakenHealth > 0 )
14388
+ {
14389
+ if ( !bSuppressSound )
14390
+ {
14391
+ EmitSound( "BaseCombatCharacter.AmmoPickup" );
14392
+ }
14393
+ m_Shared.HealthKitPickupEffects( iCount );
14394
+ }
14395
+ return iTakenHealth;
14396
+ }
14397
+
14398
+ // Ammo from the cart or engineer dispensers is flatly ignored.
14399
+ if ( eAmmoSource == kAmmoSource_DispenserOrCart )
14400
+ return 0;
14401
+
14402
+ Assert( eAmmoSource == kAmmoSource_Resupply );
14403
+ }
14404
+ #endif
14403
14405
14404
14406
// Items that rely on timers to refill ammo use these attributes
14405
14407
// Prevents "touch supply closet and spam the thing" scenario.
0 commit comments