[Freeciv-Dev] Re: The implementation if freeciv ID numbers
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sun, 19 Mar 2000, David Pfitzner wrote:
> Thue Janus Kristensen wrote:
>
> > Currently freeciv has an "unsigned char used_ids[8192];" bitvector with a
> > bit
> > per 65536 possible id number. Every time a unit or city is
> > allocated/deallocated the id bit is set/reset with with alloc_id/dealloc_id.
>
> Is this actually used though? It looked pretty crufty to me, but I
> never got around to looking at it though. My understanding is that
> the current code _doesn't_ actually re-use ids at all (despite the
> above bitvector).
They are reused.
> As you alluded, various things become a lot simpler when ids are
> never re-used (eg, no possibility of confusion between server and
> client with lag, etc), so I would suggest we go with non-reused,
> 32-bit ids.
-Thue
|
|