Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2004:
[Freeciv-Dev] Re: (PR#8672) punit->occupy has no value at the server
Home

[Freeciv-Dev] Re: (PR#8672) punit->occupy has no value at the server

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#8672) punit->occupy has no value at the server
From: "Gregory Berkolaiko" <Gregory.Berkolaiko@xxxxxxxxxxxxx>
Date: Fri, 18 Jun 2004 09:27:42 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8672 >

On Fri, 18 Jun 2004, Jason Short wrote:

> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8672 >
>
> > [jdorje - Tue May 04 17:48:11 2004]:
>
> > The quick fix is that the AI should call get_transporter_occupancy()
> > instead.  However this function is slow.  Better would be to update the
> > punit->occupy value at the server.  It should be renamed
> > (punit->occupancy?) and updated in
> > load_unit_onto_transporter/unload_unit_from_transporter.
>
> The "better" fix seems to be stalled.  This is the quick fix:
>
> - Rename punit->occupy as punit->client.is_occupied.
> - Make it always a boolean.
> - Owned and allied units have it as a boolean too (network change).
> - Don't use it in the server.
> - Avoid drawing the unit stack sprite wice (semi-related).

It looks fine to me.  The only reason to maintain punit->occupancy at
server is to speed up get_transporter_occupancy calls.  But whether we
decide for or against punit->occupancy, it makes good sense to channel all
calls to this value (at the server) through get_transporter_occupancy
(notwithstanding my dislike for the name).

G.




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