Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2001:
[Freeciv-Dev] Re: Specialist effect against unhappiness (PR#766)
Home

[Freeciv-Dev] Re: Specialist effect against unhappiness (PR#766)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Specialist effect against unhappiness (PR#766)
From: Davide Pagnin <nightmare@xxxxxxxxxx>
Date: Sat, 5 May 2001 09:06:40 -0700 (PDT)

                Hi All!
Content-Type: multipart/mixed; boundary="------------090406010509030709080202"

This is a multi-part message in MIME format.
--------------090406010509030709080202
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

                Hi All!

This little patch is a solution towards the specialist problem I've
pointed out in PR#766 bug report.

                Ciao, Davide.

--------------090406010509030709080202
Content-Type: text/plain;
 name="specialists_not_counted.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="specialists_not_counted.diff"

diff -urN -Xfreeciv.orig/diff_ignore freeciv.orig/server/cityturn.c 
freeciv/server/cityturn.c
--- freeciv.orig/server/cityturn.c      Sat Apr 14 13:34:17 2001
+++ freeciv/server/cityturn.c   Sat Apr 21 16:33:47 2001
@@ -163,12 +163,12 @@
 **************************************************************************/
 static void citizen_happy_size(struct city *pcity)
 {
-  int workers, tmp;
+  int specialists, tmp;
 
-  workers = pcity->size - city_specialists(pcity);
+  specialists = city_specialists(pcity);
   tmp = content_citizens(&game.players[pcity->owner]);
-  pcity->ppl_content[0] = MAX(0, MIN(workers, tmp));
-  pcity->ppl_unhappy[0] = workers - pcity->ppl_content[0];
+  pcity->ppl_content[0] = MAX(0, MIN(pcity->size, tmp) - specialists);
+  pcity->ppl_unhappy[0] = pcity->size - specialists - pcity->ppl_content[0];
   pcity->ppl_happy[0] = 0; /* no one is born happy */
 }
 

--------------090406010509030709080202--




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: Specialist effect against unhappiness (PR#766), Davide Pagnin <=