Example #1
0
void COMMAND_RadarAttach ( const char* szCmdLine )
{
    CRadarMap* pRadarMap = g_pClientGame->GetRadarMap ();

    if ( pRadarMap->IsRadarShowing () )
    {
        pRadarMap->SetAttachedToLocalPlayer ( !g_pClientGame->GetRadarMap ()->IsAttachedToLocalPlayer () );
    }
}
Example #2
0
void COMMAND_RadarZoomOut ( const char* szCmdLine )
{
    CRadarMap* pRadarMap = g_pClientGame->GetRadarMap ();

    if ( pRadarMap->IsRadarShowing () )
    {
        pRadarMap->ZoomOut ();
    }
}
Example #3
0
void COMMAND_RadarOpacityUp(const char* szCmdLine)
{
    CRadarMap* pRadarMap = g_pClientGame->GetRadarMap();
    if (pRadarMap->IsRadarShowing())
    {
        int iAlpha;
        g_pCore->GetCVars()->Get("mapalpha", iAlpha);
        iAlpha = std::min(255, iAlpha + 20);
        g_pCore->GetCVars()->Set("mapalpha", iAlpha);
    }
}
Example #4
0
void COMMAND_RadarOpacityDown ( const char* szCmdLine )
{
    CRadarMap* pRadarMap = g_pClientGame->GetRadarMap ();
    if ( pRadarMap->IsRadarShowing () )
    {
        int iAlpha;
        g_pCore->GetCVars ()->Get ( "mapalpha", iAlpha );
        iAlpha = Max ( 0, iAlpha - 20 );
        g_pCore->GetCVars ()->Set ( "mapalpha", iAlpha );
    }
}
Example #5
0
void COMMAND_RadarMoveWest ( const char* szCmdLine )
{
    CRadarMap* pRadarMap = g_pClientGame->GetRadarMap ();

    if ( pRadarMap->IsRadarShowing () )
    {
        // Toggle on/off
        if ( pRadarMap->IsMovingWest () )
            pRadarMap->SetMovingWest ( false );
        else if ( pRadarMap->IsMovingEast () )
            pRadarMap->SetMovingEast ( false );
        else
        {
            pRadarMap->SetMovingNorth ( false );
            pRadarMap->SetMovingSouth ( false );
            pRadarMap->SetMovingEast ( false );
            pRadarMap->SetMovingWest ( true );
        }
    }
}