[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]
<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.
- [Freeciv-Dev] Re: (PR#8672) punit->occupy has no value at the server,
Gregory Berkolaiko <=
|
|