Bazaar developer reference

CvGame::setGameTurn(int)

Defined in
CvGame.cpp, line 4451
Class
CvGame
Hook name
CivHooks::CvGame_setGameTurn

Hooks

static bool BeforeCvGame_setGameTurn(CvGame* self, int iNewValue);static void AfterCvGame_setGameTurn(CvGame* self, int iNewValue);static void ReplaceCvGame_setGameTurn(void (*original)(CvGame*, int), CvGame* self, int iNewValue);CivRegisterBefore<CivHooks::CvGame_setGameTurn>(host, &BeforeCvGame_setGameTurn);CivRegisterAfter<CivHooks::CvGame_setGameTurn>(host, &AfterCvGame_setGameTurn);CivRegisterReplace<CivHooks::CvGame_setGameTurn>(host, &ReplaceCvGame_setGameTurn);

Code

4451void CvGame::setGameTurn(int iNewValue)4452{4453	if(getGameTurn() != iNewValue)4454	{4455		std::string turnMessage = std::string("Game Turn ") + FSerialization::toString(iNewValue) + std::string("\n");4456		gDLL->netMessageDebugLog(turnMessage);44574458		CvPreGame::setGameTurn(iNewValue);4459		CvAssert(getGameTurn() >= 0);44604461		setScoreDirty(true);44624463		GC.GetEngineUserInterface()->setDirty(TurnTimer_DIRTY_BIT, true);4464		GC.GetEngineUserInterface()->setDirty(GameData_DIRTY_BIT, true);4465		m_sentAutoMoves = false;4466		gDLL->GameplayTurnChanged(iNewValue);4467		endTurnTimerReset();4468	}4469}

Calls

Called by