//----------------------------------------------------------------------------- // Purpose: Supply the player with Ammo. Return true if some ammo was given. //----------------------------------------------------------------------------- bool CPlayerClassCommando::ResupplyAmmo( float flFraction, ResupplyReason_t reason ) { bool bGiven = false; if ((reason == RESUPPLY_ALL_FROM_STATION) || (reason == RESUPPLY_GRENADES_FROM_STATION)) { if (ResupplyAmmoType( 3 * flFraction, "Grenades" )) bGiven = true; if (ResupplyAmmoType( 1, "RallyFlags" )) bGiven = true; if (ResupplyAmmoType( 3, "Rockets" )) bGiven = true; } if ((reason == RESUPPLY_ALL_FROM_STATION) || (reason == RESUPPLY_AMMO_FROM_STATION)) { if (ResupplyAmmoType( 3, "Rockets" )) bGiven = true; } // On respawn, resupply base weapon ammo if ( reason == RESUPPLY_RESPAWN ) { } if ( BaseClass::ResupplyAmmo(flFraction, reason) ) bGiven = true; return bGiven; }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- bool CPlayerClassDefender::ResupplyAmmo( float flFraction, ResupplyReason_t reason ) { bool bGiven = false; if ((reason == RESUPPLY_ALL_FROM_STATION) || (reason == RESUPPLY_AMMO_FROM_STATION)) { if (ResupplyAmmoType( 20 * flFraction, "Limpets" )) bGiven = true; // Defender doesn't use rockets, but his sentryguns do if (ResupplyAmmoType( 50 * flFraction, "Rockets" )) bGiven = true; } if ((reason == RESUPPLY_ALL_FROM_STATION) || (reason == RESUPPLY_GRENADES_FROM_STATION)) { } // On respawn, resupply base weapon ammo if ( reason == RESUPPLY_RESPAWN ) { } if ( BaseClass::ResupplyAmmo(flFraction, reason) ) bGiven = true; return bGiven; }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- bool CPlayerClassPyro::ResupplyAmmo( float flFraction, ResupplyReason_t reason ) { bool bGiven = false; if ((reason == RESUPPLY_ALL_FROM_STATION) || (reason == RESUPPLY_AMMO_FROM_STATION)) { if (ResupplyAmmoType( 80 * flFraction, PYRO_AMMO_TYPE )) bGiven = true; } // On respawn, resupply base weapon ammo if ( reason == RESUPPLY_RESPAWN ) { if ( ResupplyAmmoType( 30, PYRO_AMMO_TYPE ) ) bGiven = true; } if ( BaseClass::ResupplyAmmo(flFraction, reason) ) bGiven = true; return bGiven; }
//----------------------------------------------------------------------------- // Purpose: Supply the player with Ammo. Return true if some ammo was given. //----------------------------------------------------------------------------- bool CPlayerClass::ResupplyAmmo( float flPercentage, ResupplyReason_t reason ) { bool bGiven = false; // Fully resupply shield energy everytime if ( m_pPlayer->GetCombatShield() ) { m_pPlayer->GetCombatShield()->AddShieldHealth( 1.0 ); } if ((reason == RESUPPLY_RESPAWN) || (reason == RESUPPLY_ALL_FROM_STATION) || (reason == RESUPPLY_AMMO_FROM_STATION)) { if (ResupplyAmmoType( 1, "Sappers" )) { bGiven = true; } } return bGiven; }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- bool CPlayerClassMedic::ResupplyAmmo( float flFraction, ResupplyReason_t reason ) { bool bGiven = false; if ((reason == RESUPPLY_ALL_FROM_STATION) || (reason == RESUPPLY_GRENADES_FROM_STATION)) { if (ResupplyAmmoType( 3 * flFraction, "Grenades" )) bGiven = true; } if ((reason == RESUPPLY_ALL_FROM_STATION) || (reason == RESUPPLY_AMMO_FROM_STATION)) { } if ( reason == RESUPPLY_RESPAWN ) { } if ( BaseClass::ResupplyAmmo(flFraction, reason) ) bGiven = true; return bGiven; }