Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2002:
[Freeciv-Dev] Re: At endyear map in not displayed (PR#1883)
Home

[Freeciv-Dev] Re: At endyear map in not displayed (PR#1883)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: nightmare@xxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: At endyear map in not displayed (PR#1883)
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Sat, 7 Sep 2002 11:24:32 +0200

On Tue, Aug 27, 2002 at 06:59:39PM +0200, Raimar Falke wrote:
> On Mon, Aug 05, 2002 at 09:08:35AM -0700, nightmare@xxxxxxxxxx wrote:
> > As well known, 1.13.0 release and further development code (1.13.1-devel)
> > doesn't display the full world map at the end of a game.
> > 
> > This misbehaviour as been introduced on 3rd July, when the 
> > CLIENT_GAME_OVER_STATE has been introduced in the code.
> 
> This and the no-chatline-during-nation-selection bug is fixed by the
> attached second version of the POPS/POPF patch. The problem is the
> same in the two cases: we used some more or less arbitrary packets to
> group packets for the agents (which was latter adopted by the reports
> (the chatline is a report in this context)). In two cases a packet
> which can be used as a border-packet wasn't available. So we added
> PACKET_START_TURN and CLIENT_GAME_OVER_STATE to recognize the end of
> the pregame (started by PACKET_JOIN_GAME_REPLY) and the end of a game
> in general (started by PACKET_BEFORE_NEW_YEAR).
> 
> As pointed out in the first version of the POPS patch I think that
> adding these two packets were a mistake. The patch fixes this. We
> could remove these two packets. But as usual other things use the
> packets. At least the PACKET_START_TURN.
> 
> A second patch (an extended version of Davide's) should be applied on
> top of this which will let the client take full advantage of the
> information of CLIENT_GAME_OVER_STATE. Till then the state is ignored.
> 
> I know that the patch is only a band-aid for the problem is was
> created for. To make it clear that I don't intend to use the patch for
> this I removed this part:
> 
> @@ -565,15 +565,18 @@
>                   err = gettimeofday(&start, &tz);
>                   assert(!err);
>  #endif
> -               connection_do_buffer(pconn);
> +               conn_list_do_buffer(&game.all_connections);
>                 start_processing_request(pconn,
>                                          pconn->server.
>                                          last_request_id_seen);
> +               prepare_for_sending_POPS(pconn);
> +
>                 command_ok = handle_packet_input(pconn, packet, type);
>                 packet = NULL;
> 
> +               send_POPF();
>                 finish_processing_request(pconn);
> -               connection_do_unbuffer(pconn);
> +               conn_list_do_unbuffer(&game.all_connections);
>                 if (!command_ok) {
>                   close_connection(pconn);
>                 }
> 
> So the name of the packets should be changed from
> PACKET_OTHER_PROCESSING_STARTED and PACKET_OTHER_PROCESSING_FINISHED
> to PACKET_FREEZE_HINT and PACKET_THAW_HINT. The emphasis is on
> HINT. These packets mark a set of other packets which are send out
> within a small timeframe and may contain inconsistent data.
> 
> Changes from the previous version:
>  - remove the piece above
>  - remove a freeze in agents_joined
>  - add a condition and a long comment to set_client_state

Changes:
 - rename to PACKET_FREEZE_HINT/PACKET_THAW_HINT
 - remove assert(find_city_by_id(pcity->id) == pcity);
 - remove the fields from connection
 - remove prepare_for_sending_POPS and send_POPF

Please test again. It will applied in two days.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
    1) Customers cause problems.
    2) Marketing is trying to create more customers.
  Therefore:
    3) Marketing is evil.

Attachment: POPS3.diff
Description: Text document


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: At endyear map in not displayed (PR#1883), Raimar Falke <=