Ahwaric
Shrubbery-hugger
Got another problem, a weird one this time.
I have added The White Hand as an adoptable religion, but my version differs in several points from RifE version.
I have added a code to allow religion to modify terrain yields. Plusd I do not want it to stack with bonuses that Illians & doviello already get from winter terrain.
It is working fine on vista and win7, while on XP it causes UI crash (i.e. when founding a city)
The added code is in CvPlot::calculateNatureYield my addition is marked in red
Any ideas what is wrong?
I have added The White Hand as an adoptable religion, but my version differs in several points from RifE version.
I have added a code to allow religion to modify terrain yields. Plusd I do not want it to stack with bonuses that Illians & doviello already get from winter terrain.
It is working fine on vista and win7, while on XP it causes UI crash (i.e. when founding a city)
The added code is in CvPlot::calculateNatureYield my addition is marked in red
Code:
/*************************************************************************************************/
/** CivPlotMods 03/23/09 Jean Elcard **/
/** Civilization Terrain Yield Changes **/
/** No longer needed. Replaced (in a better way) by Civ-specific Yields. **/
/*************************************************************************************************/
/** ---- Start Original Code ---- **
//FfH: Added by Kael 09/25/2008
if (isOwned())
{
if (GET_PLAYER(getOwnerINLINE()).getCivilizationType() == GC.getTerrainInfo((TerrainTypes)getTerrainType()).getCivilizationYieldType())
{
iYield += GC.getTerrainInfo((TerrainTypes)getTerrainType()).getCivilizationYieldChange(eYield);
}
}
//FfH: End Add
/** ---- End Original Code ---- **/
if (eTeam != NO_TEAM)
{
for (int iI = 0; iI < MAX_CIV_PLAYERS; iI++)
{
if (GET_PLAYER((PlayerTypes)iI).isAlive())
{
if (GET_PLAYER((PlayerTypes)iI).getTeam() == eTeam)
{
iYield += GC.getCivilizationInfo(GET_PLAYER((PlayerTypes)iI).getCivilizationType()).getTerrainYieldChanges(getTerrainType(), eYield);
[COLOR="Red"] if (GC.getCivilizationInfo(GET_PLAYER((PlayerTypes)iI).getCivilizationType()).getTerrainYieldChanges(getTerrainType(), eYield) == 0)
{
if (GET_PLAYER(getOwnerINLINE()).getStateReligion() != NO_RELIGION)
{
iYield += GC.getReligionInfo(GET_PLAYER(getOwnerINLINE()).getStateReligion()).getReligionTerrainYields(getTerrainType(), eYield);
}
}[/COLOR]
}
}
}
}
/*************************************************************************************************/
/** CivPlotMods END **/
/*************************************************************************************************/