mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-01 00:21:43 +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);
|
||||
use_staticrng = true;
|
||||
Printf("D_DoomInit: Static RNGseed %d set.\n", rngseed);
|
||||
}
|
||||
else
|
||||
rngseed = I_MakeRNGSeed();
|
||||
|
|
|
@ -408,13 +408,11 @@ void G_InitNew (const char *mapname, bool bTitleLevel)
|
|||
|
||||
if (!savegamerestore)
|
||||
{
|
||||
if (use_staticrng)
|
||||
if (!netgame && !demorecording && !demoplayback)
|
||||
{
|
||||
rngseed = staticrngseed;
|
||||
}
|
||||
else if (!netgame)
|
||||
{ // [RH] Change the random seed for each new single player game
|
||||
rngseed = rngseed + 1;
|
||||
// [RH] Change the random seed for each new single player game
|
||||
// [ED850] The demo already sets the RNG.
|
||||
rngseed = use_staticrng ? staticrngseed : (rngseed + 1);
|
||||
}
|
||||
FRandom::StaticClearRandom ();
|
||||
P_ClearACSVars(true);
|
||||
|
|
Loading…
Reference in a new issue