@@ -1295,10 +1295,8 @@ CTFHudPlayerArmor::CTFHudPlayerArmor(Panel* parent, const char* name) : Editable
12951295 m_iAnimState = HUD_HEALTH_NO_ANIM;
12961296 m_bAnimate = true ;
12971297
1298- #ifdef BDSBASE
12991298 m_pPlayerArmorLabel = NULL ;
13001299 m_pPlayerMaxArmorLabel = NULL ;
1301- #endif
13021300}
13031301
13041302CTFHudPlayerArmor::~CTFHudPlayerArmor ()
@@ -1346,18 +1344,15 @@ void CTFHudPlayerArmor::ApplySchemeSettings(IScheme* pScheme)
13461344
13471345 BaseClass::ApplySchemeSettings (pScheme);
13481346
1349- #ifdef BDSBASE
13501347 m_pPlayerArmorLabel = dynamic_cast <CExLabel*>(FindChildByName (" PlayerStatusArmorValue" ));
13511348 m_pPlayerMaxArmorLabel = dynamic_cast <CExLabel*>(FindChildByName (" PlayerStatusMaxArmorValue" ));
1352- #endif
13531349}
13541350
13551351// -----------------------------------------------------------------------------
13561352// Purpose:
13571353// -----------------------------------------------------------------------------
13581354void CTFHudPlayerArmor::SetArmor (int iNewHealth, int iMaxHealth)
13591355{
1360- #ifdef BDSBASE
13611356 if (m_nArmor != iNewHealth || m_nMaxArmor != iMaxHealth)
13621357 {
13631358 // set our health
@@ -1450,97 +1445,6 @@ void CTFHudPlayerArmor::SetArmor(int iNewHealth, int iMaxHealth)
14501445 SetDialogVariable (" Armor" , m_nArmor);
14511446 SetDialogVariable (" MaxArmor" , m_nMaxArmor);
14521447 }
1453- #else
1454- // set our health
1455- m_nArmor = iNewHealth;
1456- m_nMaxArmor = iMaxHealth;
1457- m_pArmorImage->SetArmor ((float )(m_nArmor) / (float )(m_nMaxArmor));
1458-
1459- if (m_pArmorImage)
1460- {
1461- m_pArmorImage->SetFgColor (Color (255 , 255 , 255 , 255 ));
1462- }
1463-
1464- if (m_nArmor <= 0 )
1465- {
1466- if (m_pArmorImageBG->IsVisible ())
1467- {
1468- m_pArmorImageBG->SetVisible (false );
1469- }
1470-
1471- HideArmorBonusImage ();
1472- }
1473- else
1474- {
1475- if (!m_pArmorImageBG->IsVisible ())
1476- {
1477- m_pArmorImageBG->SetVisible (true );
1478- }
1479-
1480- // are we close to dying?
1481- if (m_nArmor < m_nMaxArmor * m_flArmorDeathWarning)
1482- {
1483- if (m_pArmorBonusImage && m_nBonusArmorOrigW != -1 )
1484- {
1485- if (!m_pArmorBonusImage->IsVisible ())
1486- {
1487- m_pArmorBonusImage->SetVisible (true );
1488- }
1489-
1490- if (m_bAnimate && m_iAnimState != HUD_HEALTH_DYING_ANIM)
1491- {
1492- g_pClientMode->GetViewportAnimationController ()->StartAnimationSequence (this , " HudArmorDyingPulse" );
1493-
1494- m_iAnimState = HUD_HEALTH_DYING_ANIM;
1495- }
1496-
1497- m_pArmorBonusImage->SetDrawColor (m_clrArmorDeathWarningColor);
1498-
1499- // scale the flashing image based on how much health bonus we currently have
1500- float flBoostMaxAmount = m_nMaxArmor * m_flArmorDeathWarning;
1501- float flPercent = (flBoostMaxAmount - m_nArmor) / flBoostMaxAmount;
1502-
1503- int nPosAdj = RoundFloatToInt (flPercent * m_nArmorBonusPosAdj);
1504- int nSizeAdj = 2 * nPosAdj;
1505-
1506- m_pArmorBonusImage->SetBounds (m_nBonusArmorOrigX - nPosAdj,
1507- m_nBonusArmorOrigY - nPosAdj,
1508- m_nBonusArmorOrigW + nSizeAdj,
1509- m_nBonusArmorOrigH + nSizeAdj);
1510- }
1511-
1512- if (m_pArmorImage)
1513- {
1514- m_pArmorImage->SetFgColor (m_clrArmorDeathWarningColor);
1515- }
1516- }
1517- // turn it off
1518- else
1519- {
1520- HideArmorBonusImage ();
1521- }
1522- }
1523-
1524- // set our health display value
1525- if (m_nArmor > 0 )
1526- {
1527- SetDialogVariable (" Armor" , m_nArmor);
1528-
1529- if (m_nMaxArmor - m_nArmor >= 5 )
1530- {
1531- SetDialogVariable (" MaxArmor" , m_nMaxArmor);
1532- }
1533- else
1534- {
1535- SetDialogVariable (" MaxArmor" , " " );
1536- }
1537- }
1538- else
1539- {
1540- SetDialogVariable (" Armor" , " " );
1541- SetDialogVariable (" MaxArmor" , " " );
1542- }
1543- #endif
15441448}
15451449
15461450// -----------------------------------------------------------------------------
0 commit comments