Add game and round seeds, meant for use with RandomGen.
This commit is contained in:
@@ -77,6 +77,9 @@ void GameState::Reset()
|
|||||||
m_bAllow2ndExtraStage = true;
|
m_bAllow2ndExtraStage = true;
|
||||||
m_bDifficultCourses = false;
|
m_bDifficultCourses = false;
|
||||||
|
|
||||||
|
m_iGameSeed = rand();
|
||||||
|
m_iRoundSeed = rand();
|
||||||
|
|
||||||
m_pCurSong = NULL;
|
m_pCurSong = NULL;
|
||||||
for( p=0; p<NUM_PLAYERS; p++ )
|
for( p=0; p<NUM_PLAYERS; p++ )
|
||||||
m_pCurNotes[p] = NULL;
|
m_pCurNotes[p] = NULL;
|
||||||
|
|||||||
@@ -53,6 +53,10 @@ public:
|
|||||||
PlayerNumber m_MasterPlayerNumber; // used in Styles where one player controls both sides
|
PlayerNumber m_MasterPlayerNumber; // used in Styles where one player controls both sides
|
||||||
bool m_bIsOnSystemMenu; // system screens will not be effected by the operator key -- Miryokuteki
|
bool m_bIsOnSystemMenu; // system screens will not be effected by the operator key -- Miryokuteki
|
||||||
bool m_bDifficultCourses; //used in nonstop
|
bool m_bDifficultCourses; //used in nonstop
|
||||||
|
|
||||||
|
/* This is set to a random number per-game/round; it can be used for a random seed. */
|
||||||
|
int m_iGameSeed, m_iRoundSeed;
|
||||||
|
|
||||||
int GetNumSidesJoined()
|
int GetNumSidesJoined()
|
||||||
{
|
{
|
||||||
int iNumSidesJoined = 0;
|
int iNumSidesJoined = 0;
|
||||||
|
|||||||
@@ -949,6 +949,7 @@ void ScreenEvaluation::MenuStart( PlayerNumber pn )
|
|||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
m_Grades[p].SettleImmediately();
|
m_Grades[p].SettleImmediately();
|
||||||
|
|
||||||
|
GAMESTATE->m_iRoundSeed = rand();
|
||||||
|
|
||||||
if( PREFSMAN->m_bEventMode )
|
if( PREFSMAN->m_bEventMode )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user