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

[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: Tue, 27 Aug 2002 18:59:39 +0200

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);
-               connection_do_buffer(pconn);
+               conn_list_do_buffer(&game.all_connections);
+               prepare_for_sending_POPS(pconn);
                command_ok = handle_packet_input(pconn, packet, type);
                packet = NULL;

+               send_POPF();
-               connection_do_unbuffer(pconn);
+               conn_list_do_unbuffer(&game.all_connections);
                if (!command_ok) {

So the name of the packets should be changed from
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


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

Attachment: POPS2.diff
Description: Text document

[Prev in Thread] Current Thread [Next in Thread]