Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions sp/src/game/client/hl2/hud_suitpower.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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");

Expand Down
Loading