<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39330 >
Jason Short wrote: > <URL: http://bugs.freeciv.org/Ticket/Display.html?id=39330 > >> Well, the patch can be easily be modified to send 'TILE_UNKNOWN' >> instead, for the case when the tile is seen by a city, but unknown. >> A *seen* tile is allowed to be *unknown* according to a comment in >> server/maphand.c, starting at line 810 on the SVN head revision, which I >> quote here: > > A tile can be known but not seen. In this case the tile should be > marked as TILE_UNKNOWN in the player tile, NOT as TILE_KNOWN_FOGGED. No, a known but unseen tile *should* be marked as TILE_KNOWN_FOGGED. The code already does this, and my patch does not change this. Anyway, I modified the patch as I said I would, so that unknown but seen tiles are marked as TILE_UNKNOWN now. I tested it, and it works fine. The revised patch is attached to this message. > What is a bit tricky is that map_get_seen can > return TRUE for unknown tiles That is precisely the case the patch deals with, since it wasn't being dealt with before. >>>> P.S. Send future reports to the bug tracker. >> I *did* send the *report* to the tracker. Are you asking me to only send >> future *patches* for open/new tickets to the tracker and not the list? >> Do you want me to create a new ticket for each patch, like you >> apparently did to respond to my earlier message? > > You sent the report to the tracker then sent the patch to the list. Part of the reason for this was to make sure that I could actually post to the list, if needed. :-) Eric
Index: server/maphand.c =================================================================== --- server/maphand.c (revision 12916) +++ server/maphand.c (working copy) @@ -475,10 +475,10 @@ && map_get_seen(ptile, pplayer, V_MAIN) == 0) { struct player_tile *plrtile = map_get_player_tile(ptile, pplayer); - info.known = TILE_KNOWN_FOGGED; - info.type = plrtile->terrain->index; + info.known = plrtile->terrain ? TILE_KNOWN_FOGGED : TILE_UNKNOWN; + info.type = plrtile->terrain ? plrtile->terrain->index : -1; for (spe = 0; spe < S_LAST; spe++) { - info.special[spe] = BV_ISSET(plrtile->special, spe); + info.special[spe] = BV_ISSET(plrtile->special, spe); } info.resource = plrtile->resource ? plrtile->resource->index : -1; info.continent = ptile->continent;
_______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev