CvGame::assignStartingPlots()
- Defined in
- CvGame.cpp, line 1434
- Class
- CvGame
- Hook name
CivHooks::CvGame_assignStartingPlots
Hooks
static bool BeforeCvGame_assignStartingPlots(CvGame* self);static void AfterCvGame_assignStartingPlots(CvGame* self);static void ReplaceCvGame_assignStartingPlots(void (*original)(CvGame*), CvGame* self);CivRegisterBefore<CivHooks::CvGame_assignStartingPlots>(host, &BeforeCvGame_assignStartingPlots);CivRegisterAfter<CivHooks::CvGame_assignStartingPlots>(host, &AfterCvGame_assignStartingPlots);CivRegisterReplace<CivHooks::CvGame_assignStartingPlots>(host, &ReplaceCvGame_assignStartingPlots);
Code
1434void CvGame::assignStartingPlots()1435{1436 // Set up the start positioner1437 CvStartPositioner* pPositioner = GetStartPositioner();14381439 // Divide the map into equal fertility plots1440 pPositioner->DivideMapIntoRegions(countMajorCivsAlive());14411442 // Compute the value of a city in each plot1443 pPositioner->ComputeFoundValues();14441445 // Position the players1446 pPositioner->RankPlayerStartOrder();1447 pPositioner->AssignStartingLocations();1448}