<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40316 >
On Wed, Jul 23, 2008 at 2:46 PM, guest user <Freeciv> wrote: > > <URL: http://bugs.freeciv.org/Ticket/Display.html?id=40316 > > > [EMAIL PROTECTED] > > Well I probably have the time for working on this but my experience > doesn't quite match yours with neither the C programming language nor > the freeciv source code, so I'm not all that confident that it would be > just a matter of "a few weeks"... ;) > > I can see books point, all of which quite sensible, and understand that > the actual problem is quite somewhere else. It just isn't quite > reassuring for me that an incredible complex and obscure code block I > believe could be the source of the problem is commented on top of it > with the words "This was once very ugly...". In this tradition you could > maybe use my current patch as temporarily solution if you want to branch > S2_3 any time soon, as reverting back to the old S2_1 state would > probably mean killing off a lot of good work related to the border > algorithms (which seems to be the key change between versions that > screwed all this fogged stuff up). I don't have access to a development machine ATM, but I do have some time to help out without coding. You should consider joining IRC: #freeciv-dev on irc.freenode.org, where developers hang out and can discuss things. The basic design of "dumb" cities is that the server maintains, *for each player*, a separate map (server/plrmap.c) containing everything that the player knows and all cities. This gets a bit complicated when it comes to shared vision and teams, but each time the player sees something their map is updated. Even if the client disconnects and reconnects, the server still knows what the player "remembers" from fogged tiles. Cities visible here will be sent to the client in the "short_city" packet. Though this packet is also used for all enemy cities, even ones that the player can see directly, so there must be something else wrong here. The short_city packet arrives and tells the client of the city there. The city is thus created and added to the player's city list; pcity->tile and ptile->city are both set to the correct values. In general ptile->city->tile == ptile and pcity->tile->city == pcity all the time (that would be a useful assertion to add somewhere - in fact client-side sanity checks might be a good thing in general, but that's off topic). If your patch fixes the problem, that indicates to me that pcity->tile == ptile but ptile->city is NULL. Which means ptile->city isn't being initialized correctly when the short_city packet arrives, possibly is being set to NULL incorrectly when the tile is fogged. Question: if you disconnect and reconnect to the server, are the fogged cities shown then? I cannot recall testing this. -jason _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev