Skip to content

Commit

Permalink
Extra fix for advanced options
Browse files Browse the repository at this point in the history
  • Loading branch information
RecursiveVision committed Jun 25, 2024
1 parent 11eb133 commit 8a0ff9e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CvGameCoreDLL_Expansion2/CvCity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34893,6 +34893,9 @@ void CvCity::SpawnFreeUnit(UnitTypes eUnit)
ReligionTypes eReligion = NO_RELIGION;
if (pkUnitInfo->IsSpreadReligion() || pkUnitInfo->IsRemoveHeresy())
{
if (GC.getGame().isOption(GAMEOPTION_NO_RELIGION))
return;

eReligion = kPlayer.GetReligions()->GetStateReligion(false);
if (eReligion == NO_RELIGION)
eReligion = GetCityReligions()->GetReligiousMajority();
Expand Down
3 changes: 3 additions & 0 deletions CvGameCoreDLL_Expansion2/CvCityCitizens.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3215,6 +3215,9 @@ void CvCityCitizens::DoSpawnGreatPerson(UnitTypes eUnit, bool bIncrementCount, b
{
CvAssert(eUnit != NO_UNIT);

if (GC.getUnitInfo(eUnit)->IsFoundReligion() && GC.getGame().isOption(GAMEOPTION_NO_RELIGION))
return;

// Not a great person
if (GC.getUnitInfo(eUnit)->GetSpecialUnitType() != static_cast<SpecialUnitTypes>(GC.getInfoTypeForString("SPECIALUNIT_PEOPLE")))
return;
Expand Down

0 comments on commit 8a0ff9e

Please sign in to comment.