mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'time-attack-rng' into 'master'
Use deterministic RNG seed for Time Attack See merge request KartKrew/Kart!1741
This commit is contained in:
commit
d3cb721381
1 changed files with 12 additions and 1 deletions
13
src/g_game.c
13
src/g_game.c
|
|
@ -5892,7 +5892,18 @@ void G_InitNew(UINT8 pencoremode, INT32 map, boolean resetplayer, boolean skippr
|
|||
comebackshowninfo = false;
|
||||
|
||||
if (!demo.playback && !netgame) // Netgame sets random seed elsewhere, demo playback sets seed just before us!
|
||||
P_ClearRandom(M_RandomizedSeed()); // Use a more "Random" random seed
|
||||
{
|
||||
if (modeattacking != ATTACKING_NONE && mapheaderinfo[map-1]->lumpnum != LUMPERROR)
|
||||
{
|
||||
// Use deterministic starting RNG for Time Attack
|
||||
P_ClearRandom(mapheaderinfo[map-1]->lumpnamehash);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Use a more "Random" random seed
|
||||
P_ClearRandom(M_RandomizedSeed());
|
||||
}
|
||||
}
|
||||
|
||||
// Clear a bunch of variables
|
||||
redscore = bluescore = lastmap = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue