Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2002:
[Freeciv-Dev] Question about attributes
Home

[Freeciv-Dev] Question about attributes

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Question about attributes
From: Teemu Kurppa <tkurppa@xxxxxxxxxx>
Date: Tue, 8 Jan 2002 14:51:30 +0200 (EET)

This question is mainly meant for Raimar, but I send it here anyway. 

Attributes (attribute.c and attribute.h) are persistent client side
data. Server stores them, but it doesn't have to be aware of their
meaning. 

We discussed about them on #freeciv yesterday. I asked, when should I
update client side data structures, that are using the attribute facility. 
You answered that maybe I should redesign my code, so that it uses
attributes directly. 

Basically this means that I have to query data with attr_get_* every time
I want to access it. Did you mean that ? This makes coding a little bit
cumbersome compared to solution, in which persistent data is restored to
client side data structures, when client reconnects. After that we can
normally use client side data structures, and only when we modify them,
should we dump/save them to the attribute facility. 

Another concern: I think that a client should flush attributes to a
server, when a player decides to disconnect. Currently it flushes them
only at the end of turn.   

Teemu Kurppa 



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