Browse Source

Add "Half-Life: Urbicide" support

mobile_hacks
Andrey Akhmichin 2 years ago
parent
commit
e948de3d41
No known key found for this signature in database
GPG Key ID: 1F180D249B0643C0
  1. 3
      cl_dll/battery.cpp
  2. 3
      cl_dll/health.cpp
  3. 5
      cl_dll/hud.cpp
  4. 3
      dlls/moddef.h

3
cl_dll/battery.cpp

@ -72,7 +72,8 @@ int CHudBattery::MsgFunc_Battery( const char *pszName, int iSize, void *pbuf ) @@ -72,7 +72,8 @@ int CHudBattery::MsgFunc_Battery( const char *pszName, int iSize, void *pbuf )
int CHudBattery::Draw( float flTime )
{
#ifdef MOBILE_HACKS
if( g_iModType == MOD_SEWER_BETA )
if( g_iModType == MOD_SEWER_BETA
|| g_iModType == MOD_URBICIDE )
return 1;
#endif // MOBILE_HACKS
if( gHUD.m_iHideHUDDisplay & HIDEHUD_HEALTH )

3
cl_dll/health.cpp

@ -238,7 +238,8 @@ int CHudHealth::Draw( float flTime ) @@ -238,7 +238,8 @@ int CHudHealth::Draw( float flTime )
int iWidth = HealthWidth / 10;
#ifdef MOBILE_HACKS
UnpackRGB( r, g, b, g_iHudColor );
if( g_iModType != MOD_SEWER_BETA )
if( !( g_iModType == MOD_SEWER_BETA
|| g_iModType == MOD_URBICIDE ) )
#else // MOBILE_HACKS
UnpackRGB( r, g, b, RGB_YELLOWISH );
#endif // MOBILE_HACKS

5
cl_dll/hud.cpp

@ -414,6 +414,11 @@ void CHud::Init( void ) @@ -414,6 +414,11 @@ void CHud::Init( void )
g_iModType = MOD_INDUCTION;
g_iHudColor = RGB_YELLOWISH;
}
else if( HUD_IsGame( "hl_urbicide" ) )
{
g_iModType = MOD_URBICIDE;
g_iHudColor = RGB_WHITISH;
}
else
{
g_iModType = MOD_VALVE;

3
dlls/moddef.h

@ -15,7 +15,8 @@ enum @@ -15,7 +15,8 @@ enum
MOD_INDUCTION, // Half-Life: Induction
MOD_REDEMPT, // Redemption/Absolute Redemption
MOD_SEWER_BETA, // Sewer Beta
MOD_TOT // Times of Troubles
MOD_TOT, // Times of Troubles
MOD_URBICIDE // Half-Life: Urbicide
};
#endif // MODDEF

Loading…
Cancel
Save