Fixed super wierd bug where the conquering player hadn't met the civ he was conquering the city from (whaaaaat)

This commit is contained in:
Yair Morgenstern 2019-12-22 19:00:58 +02:00
parent ca86d9d360
commit 82d8670b16

View file

@ -354,6 +354,12 @@ class CityInfo {
val currentPopulation = population.population
val percentageOfCivPopulationInThatCity = currentPopulation * 100f / civInfo.cities.sumBy { it.population.population }
val aggroGenerated = 10f + percentageOfCivPopulationInThatCity.roundToInt()
// How can you conquer a city but not know the civ you conquered it from?!
// I don't know either, but some of our players have managed this, and crashed their game!
if(!conqueringCiv.knows(oldCiv))
conqueringCiv.meetCivilization(oldCiv)
oldCiv.getDiplomacyManager(conqueringCiv)
.addModifier(DiplomaticModifiers.CapturedOurCities, -aggroGenerated)