Index: client/packhand.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/packhand.c,v retrieving revision 1.236 diff -u -r1.236 packhand.c --- client/packhand.c 2002/05/24 07:59:05 1.236 +++ client/packhand.c 2002/05/28 19:49:24 @@ -1164,6 +1164,32 @@ /************************************************************************** ... **************************************************************************/ +static void read_player_info_techs(struct player *pplayer, + unsigned char *inventions) +{ + int i; + bool need_effect_update = FALSE; + + for (i = 0; i < game.num_tech_types; i++) { + enum tech_state newstate, oldstate; + + oldstate = pplayer->research.inventions[i].state; + newstate = inventions[i] - '0'; + pplayer->research.inventions[i].state = newstate; + if (newstate != oldstate + && (newstate == TECH_KNOWN || oldstate == TECH_KNOWN)) { + need_effect_update = TRUE; + } + } + if (need_effect_update) { + update_all_effects(); + } + update_research(pplayer); +} + +/************************************************************************** +... +**************************************************************************/ void handle_player_info(struct packet_player_info *pinfo) { int i; @@ -1199,10 +1225,7 @@ } pplayer->reputation = pinfo->reputation; - for (i = 0; i < game.num_tech_types; i++) { - pplayer->research.inventions[i].state = pinfo->inventions[i] - '0'; - } - update_research(pplayer); + read_player_info_techs(pplayer, pinfo->inventions); poptechup = (pplayer->research.researching!=pinfo->researching); pplayer->research.bulbs_researched = pinfo->bulbs_researched;