[Freeciv-Dev] Re: (PR#3736) Pregame player list
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sun, Apr 20, 2003 at 12:34:53AM -0700, andrearo@xxxxxxxxxxxx wrote:
> Mike Kaufman wrote:
>
> >On Sat, Apr 19, 2003 at 11:59:53AM -0700, andrearo@xxxxxxxxxxxx wrote:
> >
> >
> >>To make sure that game.est_connections always contains
> >>a correct list of connections, I had to change connecthand.c:
> >> - struct conn_list *dest = &pconn->self;
> >>+ struct conn_list *dest = &game.est_connections;
> >>It solves the problem, but is this the correct way to do it?
> >>
> >>
> >
> >no it isn't. To see why, connect a first client to the server and then
> >connect a second. watch what happens.
> >
> >-mike
> >
> I see, the problem is that the new client conneting doesn't get the list
> of the other clients.
> A solution is to first send info about the new client to all clients,
> and then send info
> about all clients to the new client. I've tested it without any problems.
well this wasn't the problem I was referring to, but I believe that you're
right. I'll check the connecthand part of your solution probably tonight.
Most of the the rest is up to vasc, but a couple things:
> + "label", _("_Connected Players:"),
> + "xalign", 0.0, "yalign", 0.5, NULL);
> + scroll_panel = gtk_scrolled_window_new(NULL,NULL);
This should rather be "Connected Users".
> {
> gtk_input_remove(input_id);
> gdk_window_set_cursor(root_window, NULL);
> + conn_list_init(&game.all_connections);
> + conn_list_init(&game.est_connections);
> + conn_list_init(&game.game_connections);
> }
this shouldn't be here. It does appear that client_init() does not get
called yet. Either don't update the list (and don't require the use of the
conn lists) until handle_conn_info gets called (the best solution) or make
these inits near the top of civclient.c,
>
> /* "establish" the connection */
> pconn->established = TRUE;
> - conn_list_insert_back(&game.est_connections, pconn);
> send_conn_info(dest, &game.est_connections);
> -
> + conn_list_insert_back(&game.est_connections, pconn);
> + send_conn_info(&game.est_connections, dest);
> +
I'm not quite sure about this yet, I'll check. Vasc, hold off on commiting
this.
-mike
PS: a very good feature, should be ported to all the clients.
- [Freeciv-Dev] (PR#3736) Pregame player list, Vasco Alexandre da Silva Costa, 2003/04/18
- Message not available
- [Freeciv-Dev] Re: (PR#3736) Pregame player list, andrearo@xxxxxxxxxxxx, 2003/04/19
- Message not available
- [Freeciv-Dev] Re: (PR#3736) Pregame player list, Mike Kaufman, 2003/04/19
- Message not available
- [Freeciv-Dev] Re: (PR#3736) Pregame player list, andrearo@xxxxxxxxxxxx, 2003/04/20
- Message not available
- [Freeciv-Dev] Re: (PR#3736) Pregame player list,
Mike Kaufman <=
- Message not available
- [Freeciv-Dev] Re: (PR#3736) Pregame player list, andrearo@xxxxxxxxxxxx, 2003/04/21
- Message not available
- [Freeciv-Dev] Re: (PR#3736) Pregame player list, Mike Kaufman, 2003/04/21
- Message not available
- [Freeciv-Dev] Re: (PR#3736) Pregame player list, andrearo@xxxxxxxxxxxx, 2003/04/24
|
|