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:
parent
ca86d9d360
commit
82d8670b16
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue