diff -Nur -Xpatches/no.freeciv freeciv/server/cityturn.c my_freeciv/server/cityturn.c --- freeciv/server/cityturn.c Thu Dec 28 01:08:50 2000 +++ my_freeciv/server/cityturn.c Thu Dec 28 12:19:59 2000 @@ -166,14 +166,12 @@ **************************************************************************/ static void citizen_happy_size(struct city *pcity) { - int citizens, tmp; + int workers, tmp; + workers = pcity->size - city_specialists(pcity); tmp = content_citizens(&game.players[pcity->owner]); - citizens = MIN(pcity->size, tmp); - tmp = (citizens - city_specialists(pcity)); - pcity->ppl_content[0] = MAX(0, tmp); - tmp = (pcity->size - (pcity->ppl_content[0] + city_specialists(pcity))); - pcity->ppl_unhappy[0] = MAX(0, tmp); - pcity->ppl_happy[0]=0; + pcity->ppl_content[0] = MAX(0, MIN(workers, tmp)); + pcity->ppl_unhappy[0] = workers - pcity->ppl_content[0]; + pcity->ppl_happy[0] = 0; /* no one is born happy */ } /************************************************************************** @@ -183,7 +181,8 @@ { int x=pcity->luxury_total; happy_copy(pcity, 0); - /* make people happy, content are made happy first, then unhappy content etc. each conversions costs 2 luxuries. */ + /* make people happy, content are made happy first, then unhappy content, + etc. each conversions costs 2 luxuries. */ while (x>=2 && (pcity->ppl_content[1])) { pcity->ppl_content[1]--; pcity->ppl_happy[1]++;