mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 20:21:26 +00:00
- fixed FileExists check for -loadgame.
This was done before the current savegame path was known so it always errored out.
This commit is contained in:
parent
35f07008cf
commit
eb369b24c3
1 changed files with 4 additions and 11 deletions
|
@ -3430,6 +3430,10 @@ static int D_InitGame(const FIWADInfo* iwad_info, TArray<FString>& allwads, TArr
|
|||
if (v)
|
||||
{
|
||||
FString file = G_BuildSaveName(v);
|
||||
if (!FileExists(file))
|
||||
{
|
||||
I_FatalError("Cannot find savegame %s", file.GetChars());
|
||||
}
|
||||
G_LoadGame(file);
|
||||
}
|
||||
|
||||
|
@ -3607,17 +3611,6 @@ static int D_DoomMain_Internal (void)
|
|||
// Now that we have the IWADINFO, initialize the autoload ini sections.
|
||||
GameConfig->DoAutoloadSetup(iwad_man);
|
||||
|
||||
// Prevent the game from starting if the savegame passed to -loadgame is invalid
|
||||
v = Args->CheckValue("-loadgame");
|
||||
if (v)
|
||||
{
|
||||
FString file = G_BuildSaveName(v);
|
||||
if (!FileExists(file))
|
||||
{
|
||||
I_FatalError("Cannot find savegame %s", file.GetChars());
|
||||
}
|
||||
}
|
||||
|
||||
// reinit from here
|
||||
|
||||
do
|
||||
|
|
Loading…
Reference in a new issue