• In anticipation of the possible announcement of Civilization 7, we have decided to already create the Civ7 forum. For more info please check the forum here .

SDK - bug in the CvPlot class

Joined
Feb 6, 2006
Messages
796
I've found a possible bug in the CvPlot.canTrain method.
The code:
Code:
	if (GC.getUnitInfo(eUnit).isPrereqReligion())
	{
		if (NULL == pCity || pCity->getReligionCount() > 0)
		{
			return false;
		}
should probably be
Code:
	if (GC.getUnitInfo(eUnit).isPrereqReligion())
	{
		if (NULL == pCity || pCity->getReligionCount() == 0)
		{
			return false;
		}

The bug has still been undetected, because no unit has a PrereqReligion value of 1 (in the unmodded game), so this code isn't normally executed.
 
Top Bottom