Starting position fixed?

ChiefSparkY

Warlord
Joined
Feb 27, 2004
Messages
130
Location
NYC
Is the starting position bug fixed in the Mac App Store release of the game? In the Steam version (and I assume others), the starting location is invariably in the very south, completely ruining the game IMO. If it was fixed in the App Store, I'd buy it all over again just for that.
 
Hi,

I already fixed this bug in my mod, but as you play on Mac you can't use it.

If you have the source code, you will find in the CvGame.cpp file, a fonction called "assignStartingPlots".
And you put this code :
Code:
bool bDone = false;
	for (int iPass = 0; iPass < 2 * MAX_PLAYERS && !bDone; iPass++)
	{
		std::vector<int> aiShuffledTeams(MAX_TEAMS);
		getSorenRand().shuffleSequence(aiShuffledTeams, "Team starting plot");
		//Start : What I removed
		/*for (int iHuman = 0; iHuman <= 1; ++iHuman)
		{
			for (iI = 0; iI < MAX_TEAMS; ++iI)
			{
				TeamTypes eTeam = (TeamTypes) aiShuffledTeams[iI];
				CvTeam& kTeam = GET_TEAM(eTeam);
				//do all human teams before AI teams
				if (kTeam.isAlive() && (iHuman == (kTeam.isHuman() ? 0 : 1)))
				{
					for (iJ = 0; iJ < MAX_PLAYERS; ++iJ)
					{
						CvPlayer& kPlayer = GET_PLAYER((PlayerTypes)iJ);
						if (kPlayer.isAlive() && kPlayer.getTeam() == eTeam)
						{
							if (kPlayer.getStartingPlot() == NULL)
							{
								CvPlot* pStartingPlot = kPlayer.findStartingPlot(false);
								if (NULL != pStartingPlot)
								{
									kPlayer.setStartingPlot(pStartingPlot, true);
								}
								break;
							}
						}
					}
				}
			}
		}*/
		//End : What I removed
		//Start : What I added
		for (iJ = MAX_PLAYERS-1; iJ >=0; iJ--)
		{
			CvPlayer& kPlayer = GET_PLAYER((PlayerTypes)iJ);
			if (kPlayer.isAlive())
			{
				if (kPlayer.getStartingPlot() == NULL)
				{
					CvPlot* pStartingPlot = kPlayer.findStartingPlot(false);
					if (NULL != pStartingPlot)
					{
						kPlayer.setStartingPlot(pStartingPlot, true);
					}
					break;
				}
			}
		}
		//End : What I added

		//check all players have starting plots
		bDone = true;
		for (iJ = 0; iJ < MAX_PLAYERS; iJ++)
		{
			if (GET_PLAYER((PlayerTypes)iJ).isAlive() && GET_PLAYER((PlayerTypes)iJ).getStartingPlot() == NULL)
			{
				bDone = false;
			}
		}
	}

But, I advise you to play with windows and to download some mods. Otherwise, you'll soon stop to play at this game.
 
Top Bottom