mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-03-10 19:22:03 +00:00
- moved -rngseed init to D_InitGame
This commit is contained in:
parent
72be9bcc27
commit
70c0b6a9a6
1 changed files with 15 additions and 16 deletions
|
@ -1931,22 +1931,6 @@ static void D_DoomInit()
|
||||||
|
|
||||||
gamestate = GS_STARTUP;
|
gamestate = GS_STARTUP;
|
||||||
|
|
||||||
const char *v = Args->CheckValue("-rngseed");
|
|
||||||
if (v)
|
|
||||||
{
|
|
||||||
rngseed = staticrngseed = atoi(v);
|
|
||||||
use_staticrng = true;
|
|
||||||
if (!batchrun) Printf("D_DoomInit: Static RNGseed %d set.\n", rngseed);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
rngseed = I_MakeRNGSeed();
|
|
||||||
use_staticrng = false;
|
|
||||||
}
|
|
||||||
srand(rngseed);
|
|
||||||
|
|
||||||
FRandom::StaticClearRandom ();
|
|
||||||
|
|
||||||
if (!batchrun) Printf ("M_LoadDefaults: Load system defaults.\n");
|
if (!batchrun) Printf ("M_LoadDefaults: Load system defaults.\n");
|
||||||
M_LoadDefaults (); // load before initing other systems
|
M_LoadDefaults (); // load before initing other systems
|
||||||
}
|
}
|
||||||
|
@ -2999,6 +2983,21 @@ static int D_InitGame(const FIWADInfo* iwad_info, TArray<FString> allwads)
|
||||||
gameinfo.nokeyboardcheats = iwad_info->nokeyboardcheats;
|
gameinfo.nokeyboardcheats = iwad_info->nokeyboardcheats;
|
||||||
gameinfo.ConfigName = iwad_info->Configname;
|
gameinfo.ConfigName = iwad_info->Configname;
|
||||||
|
|
||||||
|
const char *v = Args->CheckValue("-rngseed");
|
||||||
|
if (v)
|
||||||
|
{
|
||||||
|
rngseed = staticrngseed = atoi(v);
|
||||||
|
use_staticrng = true;
|
||||||
|
if (!batchrun) Printf("D_DoomInit: Static RNGseed %d set.\n", rngseed);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rngseed = I_MakeRNGSeed();
|
||||||
|
use_staticrng = false;
|
||||||
|
}
|
||||||
|
srand(rngseed);
|
||||||
|
|
||||||
|
FRandom::StaticClearRandom ();
|
||||||
|
|
||||||
FBaseCVar::DisableCallbacks();
|
FBaseCVar::DisableCallbacks();
|
||||||
GameConfig->DoGameSetup (gameinfo.ConfigName);
|
GameConfig->DoGameSetup (gameinfo.ConfigName);
|
||||||
|
|
Loading…
Reference in a new issue