mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +00:00
Don't change RNG in demos incase they are static
This commit is contained in:
parent
d6af8dc352
commit
6183f8125f
2 changed files with 5 additions and 6 deletions
|
@ -1998,6 +1998,7 @@ static void D_DoomInit()
|
||||||
{
|
{
|
||||||
rngseed = staticrngseed = atoi(v);
|
rngseed = staticrngseed = atoi(v);
|
||||||
use_staticrng = true;
|
use_staticrng = true;
|
||||||
|
Printf("D_DoomInit: Static RNGseed %d set.\n", rngseed);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
rngseed = I_MakeRNGSeed();
|
rngseed = I_MakeRNGSeed();
|
||||||
|
|
|
@ -408,13 +408,11 @@ void G_InitNew (const char *mapname, bool bTitleLevel)
|
||||||
|
|
||||||
if (!savegamerestore)
|
if (!savegamerestore)
|
||||||
{
|
{
|
||||||
if (use_staticrng)
|
if (!netgame && !demorecording && !demoplayback)
|
||||||
{
|
{
|
||||||
rngseed = staticrngseed;
|
// [RH] Change the random seed for each new single player game
|
||||||
}
|
// [ED850] The demo already sets the RNG.
|
||||||
else if (!netgame)
|
rngseed = use_staticrng ? staticrngseed : (rngseed + 1);
|
||||||
{ // [RH] Change the random seed for each new single player game
|
|
||||||
rngseed = rngseed + 1;
|
|
||||||
}
|
}
|
||||||
FRandom::StaticClearRandom ();
|
FRandom::StaticClearRandom ();
|
||||||
P_ClearACSVars(true);
|
P_ClearACSVars(true);
|
||||||
|
|
Loading…
Reference in a new issue