Skip to content

Commit 39faccb

Browse files
committed
Added online help for corrupted img files
1 parent 965ed20 commit 39faccb

File tree

4 files changed

+26
-1
lines changed

4 files changed

+26
-1
lines changed

MTA10/loader/MainFunctions.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -931,6 +931,7 @@ int LaunchGame ( SString strCmdLine )
931931
{
932932
CheckAndShowModelProblems();
933933
CheckAndShowUpgradeProblems();
934+
CheckAndShowImgProblems ();
934935

935936
const SString strGTAPath = GetGTAPath ();
936937
const SString strMTASAPath = GetMTASAPath ();

MTA10/loader/Utils.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1858,6 +1858,25 @@ void CheckAndShowUpgradeProblems ( void )
18581858
}
18591859

18601860

1861+
//////////////////////////////////////////////////////////
1862+
//
1863+
// CheckAndShowImgProblems
1864+
//
1865+
// Check for flagged img problems
1866+
//
1867+
//////////////////////////////////////////////////////////
1868+
void CheckAndShowImgProblems ( void )
1869+
{
1870+
SString strFilename = GetApplicationSetting ( "diagnostics", "img-file-corrupt" );
1871+
SetApplicationSetting ( "diagnostics", "img-file-corrupt", "" );
1872+
if ( !strFilename.empty () )
1873+
{
1874+
SString strMsg ( _("GTA:SA found errors in the file '%s'"), *strFilename );
1875+
DisplayErrorMessageBox ( strMsg, _E("CL44"), SString( "img-file-corrupt&name=%s", *strFilename ) );
1876+
}
1877+
}
1878+
1879+
18611880
//////////////////////////////////////////////////////////
18621881
//
18631882
// LoadFunction

MTA10/loader/Utils.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ bool CheckAndShowFileOpenFailureMessage ( void );
8080
void CheckAndShowMissingFileMessage ( void );
8181
void CheckAndShowModelProblems ( void );
8282
void CheckAndShowUpgradeProblems ( void );
83+
void CheckAndShowImgProblems ( void );
8384

8485
void BsodDetectionPreLaunch ( void );
8586
void BsodDetectionOnGameBegin ( void );

MTA10/multiplayer_sa/CMultiplayerSA_CrashFixHacks.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1536,7 +1536,11 @@ void _cdecl OnMY_printf ( DWORD dwCalledFrom, const char* szMessage )
15361536
else
15371537
if ( strMessage == "Too many objects without modelinfo structures" )
15381538
{
1539-
// Corrupted gta3.img - TODO: Inform user one day
1539+
// An img file contains errors
1540+
if ( GetApplicationSetting ( "diagnostics", "img-file-corrupt" ).empty () )
1541+
{
1542+
SetApplicationSetting ( "diagnostics", "img-file-corrupt", "gta3.img" );
1543+
}
15401544
}
15411545
}
15421546

0 commit comments

Comments
 (0)