Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2002:
[Freeciv-Dev] Re: (PR#2277) Superimposed units
Home

[Freeciv-Dev] Re: (PR#2277) Superimposed units

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] Re: (PR#2277) Superimposed units
From: "Gregory Berkolaiko via RT" <rt@xxxxxxxxxxxxxx>
Date: Fri, 8 Nov 2002 10:53:56 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Thu, 7 Nov 2002, Per I. Mathisen via RT wrote:

> 
> Actually, what you are seeing isn't what is happening. Login as d and
> see what REALLY happens...
> 
> The settler moves back into the city immediately, and the horseman takes
> its place. But for some reason a's client isn't notified, so it thinks
> the two units stack. But if they did stack, the server would assert on
> turn end. It doesn't.

Yes, I was right.  The problem is in send_unit_info_to_onlookers
        http://www.freeciv.org/lxr/source/server/unittools.c?v=cvs#L2056

In
        (!map_get_city(punit->x, punit->y) && !map_get_city(x, y))
should be OR instead of AND.  Otherwise a unit exiting or entering a city 
will not be sent to the enemies clients.

Then it becomes client's responcibility to "forget" about the unit in the 
city.  It can choose to remember, no cheating in that (humans remember 
too), but might end up holding wrong information...

Please check that I'm right and correct.  Can't send patch, sorry.

G.







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