Skip to content

Commit

Permalink
Make armour HUD red when below 25 && flash on 10 instead of 0
Browse files Browse the repository at this point in the history
  • Loading branch information
sabianroberts committed Sep 7, 2024
1 parent 64f7d95 commit 0d3bde7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 11 additions & 1 deletion cl_dll/battery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,18 @@ int CHudBattery::Draw(float flTime)

UnpackRGB(r, g, b, RGB_DEFAULT);
//if (gEngfuncs.pfnGetCvarPointer("sv_aura_regeneration")->value == 1) {
if (m_iBat > 25)
{
UnpackRGB(r, g, b, gHUD.m_iDefaultHUDColor);
}
else
{
r = 250;
g = 0;
b = 0;
}

if (m_iBat <= 0)
if (m_iBat <= 10)
{
if (!Blinking)
{
Expand Down
1 change: 1 addition & 0 deletions cl_dll/hud.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#define RGB_DEFAULT 0x00BF00FF //OLD 2.5 AND BEFORE: 54, 146, 248; NEW 2.5.1+ 0, 98, 255; SEASON 6 HECU: 30, 255, 0; SEASON 7 BLACK OPS: 255, 0, 0; SEASON 8 BLACK MESA INBOUND: 5, 147, 255; SEASON 9 LEGENDS OF NEW ROMA: 191, 0, 255;
#define RGB_GREY 0x008e8f91 //255,160,0
#define RGB_GREENISH 0x0000A000 //0,160,0
#define RGB_REDISH 0x00FF0000

#ifndef _WIN32
#define _cdecl
Expand Down

0 comments on commit 0d3bde7

Please sign in to comment.