sp/src/game/shared/hl2/basehlcombatweapon_shared.cpp
bool CBaseHLCombatWeapon::Deploy( void )
{
	// If we should be lowered, deploy in the lowered position
	// We have to ask the player if the last time it checked, the weapon was lowered
	if ( GetOwner() && GetOwner()->IsPlayer() )
	{
		CHL2_Player *pPlayer = assert_cast<CHL2_Player*>( GetOwner() );
		if ( pPlayer->IsWeaponLowered() )
		{
			if ( SelectWeightedSequence( ACT_VM_IDLE_LOWERED ) != ACTIVITY_NOT_AVAILABLE )
			{
				if ( DefaultDeploy( (char*)GetViewModel(), (char*)GetWorldModel(), ACT_VM_IDLE_LOWERED, (char*)GetAnimPrefix() ) )
				{
					m_bLowered = true;

					// Stomp the next attack time to fix the fact that the lower idles are long
					pPlayer->SetNextAttack( gpGlobals->curtime + 1.0 );
					m_flNextPrimaryAttack = gpGlobals->curtime + 1.0;
					m_flNextSecondaryAttack	= gpGlobals->curtime + 1.0;
					return true;
				}
			}
		}
	}

	m_bLowered = false;
	return BaseClass::Deploy();
}
//-----------------------------------------------------------------------------
// Purpose: 
// Output : Returns true on success, false on failure.
//-----------------------------------------------------------------------------
Output : Returns true on success, false on failure.
Output : Returns true on success false on failure .
bool CBaseHLCombatWeapon::Deploy( void )
{
	if ( GetOwner() && GetOwner()->IsPlayer() )
	{
		CHL2_Player *pPlayer = assert_cast<CHL2_Player*>( GetOwner() );
		if ( pPlayer->IsWeaponLowered() )
		{
			if ( SelectWeightedSequence( ACT_VM_IDLE_LOWERED ) != ACTIVITY_NOT_AVAILABLE )
			{
				if ( DefaultDeploy( (char*)GetViewModel(), (char*)GetWorldModel(), ACT_VM_IDLE_LOWERED, (char*)GetAnimPrefix() ) )
				{
					m_bLowered = true;
					pPlayer->SetNextAttack( gpGlobals->curtime + 1.0 );
					m_flNextPrimaryAttack = gpGlobals->curtime + 1.0;
					m_flNextSecondaryAttack	= gpGlobals->curtime + 1.0;
					return true;
				}
			}
		}
	}
	m_bLowered = false;
	return BaseClass::Deploy();
}
bool CBaseHLCombatWeapon :: Deploy ( void ) { if ( GetOwner ( ) && GetOwner ( ) -> IsPlayer ( ) ) { CHL2_Player * pPlayer = assert_cast < CHL2_Player * > ( GetOwner ( ) ) ; if ( pPlayer -> IsWeaponLowered ( ) ) { if ( SelectWeightedSequence ( ACT_VM_IDLE_LOWERED ) != ACTIVITY_NOT_AVAILABLE ) { if ( DefaultDeploy ( ( char * ) GetViewModel ( ) , ( char * ) GetWorldModel ( ) , ACT_VM_IDLE_LOWERED , ( char * ) GetAnimPrefix ( ) ) ) { m_bLowered = true ; pPlayer -> SetNextAttack ( gpGlobals -> curtime + 1.0 ) ; m_flNextPrimaryAttack = gpGlobals -> curtime + 1.0 ; m_flNextSecondaryAttack = gpGlobals -> curtime + 1.0 ; return true ; } } } } m_bLowered = false ; return BaseClass :: Deploy ( ) ; }
Purpose:
Output : Returns true on success, false on failure.
Purpose : Output : Returns true on success false on failure .
// If we should be lowered, deploy in the lowered position // We have to ask the player if the last time it checked, the weapon was lowered // Stomp the next attack time to fix the fact that the lower idles are long