Browse Source

Check for bad game data(missing or invalid hud.txt)

caseclosed
Alibek Omarov 7 years ago
parent
commit
6e5062b39e
  1. 12
      cl_dll/hud.cpp

12
cl_dll/hud.cpp

@ -381,6 +381,18 @@ void CHud::VidInit( void )
// assumption: number_1, number_2, etc, are all listed and loaded sequentially // assumption: number_1, number_2, etc, are all listed and loaded sequentially
m_HUD_number_0 = GetSpriteIndex( "number_0" ); m_HUD_number_0 = GetSpriteIndex( "number_0" );
if( m_HUD_number_0 == -1 )
{
const char *msg = "There is something wrong with your game data! Please, reinstall\n";
if( HUD_MessageBox( msg ) )
{
gEngfuncs.pfnClientCmd( "quit\n" );
}
return;
}
m_iFontHeight = m_rgrcRects[m_HUD_number_0].bottom - m_rgrcRects[m_HUD_number_0].top; m_iFontHeight = m_rgrcRects[m_HUD_number_0].bottom - m_rgrcRects[m_HUD_number_0].top;
m_Ammo.VidInit(); m_Ammo.VidInit();

Loading…
Cancel
Save