Re: [Freeciv-Dev] (PR#14636) tech update bug

2007-01-14 Thread Marko Lindqvist

URL: http://bugs.freeciv.org/Ticket/Display.html?id=14636 

On 1/14/07, Marko Lindqvist [EMAIL PROTECTED] wrote:

 URL: http://bugs.freeciv.org/Ticket/Display.html?id=14636 

 Christian Knoke [EMAIL PROTECTED]:
  When an allied has stolen a tech form an enemy, the diplomacy dialog and
  intelligence is not updated.

  Same applies when Caravan gets initial science bonus from
 establishing trade route.

  Patch is untested. It just sends player info to all clients, but I
 have not checked if client refresh dialogs when it get player info.

 At least gtk -client seems to work.


 - ML



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] (PR#14636) tech update bug

2007-01-13 Thread Marko Lindqvist

URL: http://bugs.freeciv.org/Ticket/Display.html?id=14636 

Christian Knoke [EMAIL PROTECTED]:
 When an allied has stolen a tech form an enemy, the diplomacy dialog and
 intelligence is not updated.

 Same applies when Caravan gets initial science bonus from
establishing trade route.

 Patch is untested. It just sends player info to all clients, but I
have not checked if client refresh dialogs when it get player info.

 I think there are more similar problems where player info is not sent
to other players whne something changes. I would say that it's the
rule that information is not updated only between turns, but it's not
consistent with the fact that reconnecting clients always get latest
info and some other things may tricker sending of player info with all
changes.


 - ML

diff -Nurd -X.diff_ignore freeciv/server/diplomats.c freeciv/server/diplomats.c
--- freeciv/server/diplomats.c	2006-09-07 23:51:20.0 +0300
+++ freeciv/server/diplomats.c	2007-01-14 02:15:10.0 +0200
@@ -631,7 +631,7 @@
   }
 
   /* Update stealing player's science progress and research fields */
-  send_player_info(pplayer, pplayer);
+  send_player_info(pplayer, NULL);
  
   /* Record the theft. */
   (pcity-steal)++;
diff -Nurd -X.diff_ignore freeciv/server/unithand.c freeciv/server/unithand.c
--- freeciv/server/unithand.c	2006-07-17 23:56:22.0 +0300
+++ freeciv/server/unithand.c	2007-01-14 02:13:47.0 +0200
@@ -1338,6 +1338,9 @@
   wipe_unit(punit);
   pplayer-economic.gold += revenue;
   update_tech(pplayer, revenue);
+
+  /* Inform everyone about tech changes */
+  send_player_info(pplayer, NULL);
   
   if (can_establish) {
 /* Refresh the cities. */
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev