Fix suit power HUD checking for actual sprint instead of sprint device

This commit is contained in:
ALLEN-PC\acj30 2025-01-24 10:32:30 -06:00 committed by Blixibon
parent 3f64380755
commit 3265f840b6

View File

@ -100,7 +100,11 @@ void CHudSuitPower::OnThink( void )
}
bool flashlightActive = pPlayer->IsFlashlightActive();
#ifdef MAPBASE
bool sprintActive = pPlayer->IsSprintActive();
#else
bool sprintActive = pPlayer->IsSprinting();
#endif
bool breatherActive = pPlayer->IsBreatherActive();
int activeDevices = (int)flashlightActive + (int)sprintActive + (int)breatherActive;
@ -250,7 +254,11 @@ void CHudSuitPower::Paint()
ypos += text2_gap;
}
#ifdef MAPBASE
if (pPlayer->IsSprintActive())
#else
if (pPlayer->IsSprinting())
#endif
{
tempString = g_pVGuiLocalize->Find("#Valve_Hud_SPRINT");