mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-03-11 13:01:12 +00:00
Check for bad game data(missing or invalid hud.txt)
This commit is contained in:
parent
cec6d7a1bc
commit
6e5062b39e
@ -381,6 +381,18 @@ void CHud::VidInit( void )
|
||||
// assumption: number_1, number_2, etc, are all listed and loaded sequentially
|
||||
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_Ammo.VidInit();
|
||||
|
Loading…
x
Reference in New Issue
Block a user