Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2005:
[Freeciv-Dev] (PR#13150) send new-player info to clients
Home

[Freeciv-Dev] (PR#13150) send new-player info to clients

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#13150) send new-player info to clients
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 20 May 2005 09:35:07 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13150 >

This patch makes sure new info is sent to the clients when a new player
is created: specifically when a connection is attached or when /create
is run.

-jason

Index: server/connecthand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/connecthand.c,v
retrieving revision 1.47
diff -u -r1.47 connecthand.c
--- server/connecthand.c        6 May 2005 03:23:55 -0000       1.47
+++ server/connecthand.c        20 May 2005 16:32:52 -0000
@@ -688,6 +688,9 @@
   conn_list_append(pplayer->connections, pconn);
   conn_list_append(game.game_connections, pconn);
 
+  send_game_info(NULL);
+  send_player_info(pplayer, NULL);
+
   return TRUE;
 }
   
Index: server/plrhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/plrhand.c,v
retrieving revision 1.377
diff -u -r1.377 plrhand.c
--- server/plrhand.c    11 May 2005 14:57:10 -0000      1.377
+++ server/plrhand.c    20 May 2005 16:32:53 -0000
@@ -2111,6 +2111,9 @@
     assess_danger_player(pplayer);
   }
 
+  send_game_info(NULL);
+  send_player_info(cplayer, NULL);
+
   gamelog(GAMELOG_PLAYER, cplayer);
   
   return cplayer;
Index: server/stdinhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/stdinhand.c,v
retrieving revision 1.410
diff -u -r1.410 stdinhand.c
--- server/stdinhand.c  19 May 2005 16:58:23 -0000      1.410
+++ server/stdinhand.c  20 May 2005 16:32:54 -0000
@@ -923,6 +923,8 @@
 
   pplayer->ai.control = TRUE;
   set_ai_level_directer(pplayer, game.info.skill_level);
+  send_game_info(NULL);
+  send_player_info(pplayer, NULL);
   reset_all_start_commands();
   (void) send_server_info_to_metaserver(META_INFO);
   return TRUE;

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#13150) send new-player info to clients, Jason Short <=