Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2003:
[Freeciv-Dev] Re: (PR#2975) City is building... message not displayed
Home

[Freeciv-Dev] Re: (PR#2975) City is building... message not displayed

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: kenn@xxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#2975) City is building... message not displayed
From: "Raimar Falke" <rf13@xxxxxxxxxxxxxxxxx>
Date: Thu, 27 Feb 2003 01:59:06 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Sun, Feb 02, 2003 at 12:21:26PM -0800, Guest via RT wrote:
> 
> Sometimes when a city has finished building something, the "city is
> building..." message isn't displayed in the message window. It looks
> like this occurs if want=0. The code in cityturn.c, line 640 is executed
> (picking something random to build), and no message is displayed for the
> player.
> 
> See the attached file.  Join as kenn.  End turn.  St. Petersburg
> finishes building a temple, the advisor doesn't like the idea of a
> courthouse, and no "city is building..." message is displayed.

And the patch.

Per: please review since the comment is from you and looks wrong.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "From what I am reading Win98 and NT5.0 will be getting rid of all that
  crap anyway. Seems that Microsoft has invented something called TCP/IP and
  another really revolutionary concept called DNS that eliminates the
  netbios crap too. All that arping from browsers is going to go away.
  I also hear rumors that they are on the verge of breakthrough discoveries
  called NFS, and LPD too. Given enough time and money, they might
  eventually invent Unix."
    -- George Bonser in linux-kernel

Index: server/cityturn.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/cityturn.c,v
retrieving revision 1.206
diff -u -u -r1.206 cityturn.c
--- server/cityturn.c   2003/02/12 22:22:34     1.206
+++ server/cityturn.c   2003/02/27 09:43:48
@@ -634,15 +634,14 @@
     return;
   }
 
-  /* Emergency. I have never seen that this code has been called. -- Per */
+  /* Build something random, undecided. */
   impr_type_iterate(i) {
     if (can_build_improvement(pcity, i) && i != B_PALACE) {
-      /* build something random, undecided */
-      pcity->currently_building = i;
-      pcity->is_building_unit = FALSE;
-      return;
+      id = i;
+      break;
     }
   } impr_type_iterate_end;
+  change_build_target(pplayer, pcity, id, FALSE, E_IMP_AUTO);
 }
 
 /**************************************************************************

[Prev in Thread] Current Thread [Next in Thread]