Follow-up Comment #17, patch #1280 (project freeciv):

> I tried to work on it. But, seeing more details of this patch,
> it looks like very longturn designed. It seems to admit that
> player are always played by the same user. The observers cases
> will probably have random behaviour... 

Offline events are only saved if a player has no connections (= no user
connected to this player). For the next user who takes this player, all
events are shown.

No offline events are saved for observers as they are not players ...

> Also this patch contains some errors like checking
> pplayer->connections == NULL which will always be evaluated to
> FALSE. 

I checked the patch and replaced the following line:
 
-    if (aplayer->connections) {
+    if (conn_list_size(aplayer->connections) != 0) {

> I think what would be great to simulate longturn offline
> events in regular freeciv would just be to keep messages in a
> queue and clear it every turn. All users, including players,
> observers and other people using /take, /observe or anything
> else would be allowed to see what were the message this turn.
> This also would fix that people crashing would be able to see
> the messages they didn't have time to check.

The available framework could be used for that. All messages are saved for
each player independently if he is connected or not. If he reconnects or the
player is taken by another user or an observer connects all messages are
send. This requires that the query is not deleted after the messages is send
but only if the max number of messages or max number of turns is reached.


(file #6939)
    _______________________________________________________

Additional Item Attachment:

File name: version4-0001-add-offline-events.diff Size:21 KB


    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?1280>

_______________________________________________
  Nachricht geschickt von/durch Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to