[Freeciv-Dev] Re: attrhash
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sunday, January 14, 2001, at 02:31 PM, Raimar Falke wrote:
> > Of course send to server has to either be built in just before the
>
> "built in" into what? common/hash.c?
Sorry, I meant in attrhash.c aka client/attributes.c, whenever there is a call
to hash_replace or hash_delete_entry, there would be a parallel call to sending
a packet to the server, if it is to be notified of each change. If the policy
is block update, enumeration must be added to common/hash.c and add another
function in client/attributes.c to enumerate and serialize the data, then send
it to the server.
> > call to the hash.c call, or for block send, enumeration will have to
> > be added to the common/hash.c code.
>
> Yes.
>
> > I suggest renaming attrhash to cliattrib, to better indicate the
> > usage and purpose, and hide the implementation.
>
> If cliattrib stands for client attributes why not just call it
> client/attributes.[ch]? Since the server methods will be small and
> referenced from player they can be put into server/plrhand.
Sounds good.
I think it would be useful to have the attribute hash available to the client,
but not connected to the server, until someone is actually using it for an
AI/Scripts. Then finalize the data moving issue when there's data to move. This
might also clear up the usage issue that determines whether per-transaction or
block moving is appropriate. As soon as I finish up the MacOS X client to fully
featured and usable, I'll probably move on to AI stuff in the client.
[insert clever signoff here]
Brian Olson http://bolson.org/
|
|