cl_dll
project.hud.cpp
and open up init()
(line 306).CVAR_CREATE
s, add these three after them.
CVAR_CREATE( "hud_red","255", FCVAR_ARCHIVE );
CVAR_CREATE( "hud_green", "160", FCVAR_ARCHIVE );
CVAR_CREATE( "hud_blue", "0", FCVAR_ARCHIVE );
The FCVAR_ARCHIVE
ensures that they will be remembered when you quit Half-Life.cl_util.h
and go to UnpackRGB()
(line 153). We are going to 'hijack' the processing of the HUD colour as it is being separated from its hex value to its RGB components.inline void UnpackRGB(int &r;, int &g;, int &b;, unsigned long ulRGB)
{
r = (ulRGB & 0xFF0000) >>16;
g = (ulRGB & 0xFF00) >> 8;
b = ulRGB & 0xFF;
}
with
inline void UnpackRGB(int &r;, int &g;, int &b;, unsigned long ulRGB)
{
if ( ulRGB == RGB_YELLOWISH )
{
r = CVAR_GET_FLOAT( "hud_red" );
g = CVAR_GET_FLOAT( "hud_green" );
b = CVAR_GET_FLOAT( "hud_blue" );
}
else
{
r = (ulRGB & 0xFF0000) >>16;
g = (ulRGB & 0xFF00) >> 8;
b = ulRGB & 0xFF;
}
}
What this does is it sees if the colour is the default yellow color of the HUD and if it is it replaces it with the our cvar's values.health.cpp
and scroll down to line 233.FillRGBA(x, y, iWidth, iHeight, 255, 160, 0, a);
with
FillRGBA(x, y, iWidth, iHeight, r, g, b, a);
That's it, now recompile the DLL and run the game. You can now edit the three cvars to get the desired color of your choice.user.scr
in a text editor, scroll down to
"mp_decals"
{
"Multiplayer decal limit"
{ NUMBER 0.000000 4096.000000 }
{ "300.000000" }
}
and add the following
"hud_red"
{
"Hud Red"
{ NUMBER 0 255 }
{ "255" }
}
"hud_green"
{
"Hud Green"
{ NUMBER 0 255 }
{ "160" }
}
"hud_blue"
{
"Hud Blue"
{ NUMBER 0 255 }
{ "0" }
}
Close and Save.You must log in to post a comment. You can login or register a new account.
i don't have a program for it