Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2003:
[Freeciv-Dev] (PR#4024) New tech aquired
Home

[Freeciv-Dev] (PR#4024) New tech aquired

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] (PR#4024) New tech aquired
From: "a-l@xxxxxxx" <a-l@xxxxxxx>
Date: Fri, 18 Apr 2003 04:01:06 -0700
Reply-to: rt@xxxxxxxxxxxxxx

Change an instance of "poptechup" to "new_tech_aquired" in
packhand.c: handle_player_info().

In this and maybe future cases it is useful to distinguish between
"change current research" (causes popup) and "gained a new tech"
(maybe through treaty or looting).


Arnstein


--- cvs-Apr-14/client/packhand.c        Sun Apr 13 14:27:21 2003
+++ newtech/client/packhand.c   Wed Apr 16 13:39:37 2003
@@ -1280,7 +1280,7 @@
 void handle_player_info(struct packet_player_info *pinfo)
 {
   int i;
-  bool poptechup;
+  bool poptechup, new_tech_aquired;
   char msg[MAX_LEN_MSG];
   struct player *pplayer = &game.players[pinfo->playerno];
 
@@ -1318,6 +1318,8 @@
   }
 
   poptechup = (pplayer->research.researching!=pinfo->researching);
+  new_tech_aquired = (pplayer->research.techs_researched !=
+                      pinfo->techs_researched);
   pplayer->research.bulbs_researched = pinfo->bulbs_researched;
   pplayer->research.techs_researched = pinfo->techs_researched;
   pplayer->research.researching=pinfo->researching;
@@ -1329,7 +1331,8 @@
       if(!game.player_ptr->ai.control || ai_popup_windows)
        popup_science_dialog(FALSE);
       science_dialog_update();
-
+    }
+    if (new_tech_aquired) {
       /* If we just learned bridge building and focus is on a settler
         on a river the road menu item will remain disabled unless we
         do this. (applys in other cases as well.) */

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