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

> [EMAIL PROTECTED] - Tue Jun 17 12:29:19 2008]:
> 2008/6/17 Madeline Book:
> >
> > This patch (+ the one from 40284) fixes a different
> > problem then what I originally opened this ticket for.
>  I see. So I were against your patch for wrong reasons. After
> rechecking I'm no longer against it.

Alright so I will commit this soon, after a final
> > Of course with this patch if you do the "Take this
> > player" from the connection list menu in pregame then
> > it aitoggles the player you are attached to into
> > the correct state.
>  May I commit this, or do we need longer discussion
> (in separate ticket) ?

I think ConnectDlgFix_40254.patch could make better use
of the client_player() helper function to avoid direct
references to client.conn.playing (e.g. save some typing
and make "struct player *me = client_player()" at the top
or whatever). Otherwise it's fine for the intended problem.

It might be beneficial in the future to wrap all the hard-
coded server command sending into functions that give a
cleaner interface, e.g.:

void client_request_detach(void)

void client_request_take_player(const struct player *pplayer)
  if (!pplayer || pplayer == client_player()) {
  send_chat_printf("/take \"%s\"", player_name(pplayer));

etc., so that all the hardcoded command strings are in
one and only one place. This would make the future job
of introducing packets for this functionality somewhat


Freeciv-dev mailing list

Reply via email to