//----------------------------------------------------------------------------- // Purpose: Selects the next item in the weapon menu //----------------------------------------------------------------------------- void CBaseHudWeaponSelection::UserCmd_NextWeapon(void) { // If we're not allowed to draw, ignore weapon selections if ( !BaseClass::ShouldDraw() ) return; CycleToNextWeapon(); if( hud_fastswitch.GetInt() > 0 ) { SelectWeapon(); } UpdateSelectionTime(); }
//----------------------------------------------------------------------------- // Purpose: Menu Selection Code //----------------------------------------------------------------------------- void CBaseHudWeaponSelection::SelectSlot( int iSlot ) { // A menu may be overriding weapon selection commands if ( HandleHudMenuInput( iSlot ) ) { return; } // If we're not allowed to draw, ignore weapon selections if ( !BaseClass::ShouldDraw() ) { return; } UpdateSelectionTime(); SelectWeaponSlot( iSlot ); }
//----------------------------------------------------------------------------- // Purpose: Menu Selection Code //----------------------------------------------------------------------------- void CBaseHudWeaponSelection::SelectSlot( int iSlot ) { // A menu may be overriding weapon selection commands CHudMenu *pHudMenu = GET_HUDELEMENT( CHudMenu ); if ( pHudMenu && IsHudMenuTakingInput() ) { pHudMenu->SelectMenuItem( iSlot ); // slots are one off the key numbers return; } // If we're not allowed to draw, ignore weapon selections if ( !BaseClass::ShouldDraw() ) { return; } UpdateSelectionTime(); SelectWeaponSlot( iSlot ); }