Update of bug #17280 (project freeciv):

                Category:                    None => client                 
                Severity:               2 - Minor => 3 - Normal             
                  Status:                    None => Ready For Test         
             Assigned to:                    None => jtn                    
         Planned Release:                         => 2.2.5,2.3.0            

    _______________________________________________________

Follow-up Comment #2:

Never mind, I think I've found it, and it applies to all clients. The
attached savegame (for trunk) demonstrates it. Use the Dominican Spy to
sabotage Monaco-Ville; if she has investigated the city first, Barracks will
be one of the options, otherwise it won't.

When you click "Industrial Sabotage" in the Spy orders list, the client sends
a PACKET_UNIT_DIPLOMAT_QUERY to the server, which responds with a
PACKET_CITY_SABOTAGE_LIST containing an up-to-date list of improvements in the
city (a little like a free "Investigate City"). It is the reception of this
packet that triggers the list of buildings to sabotage on the client.

In client/packhand.c:handle_city_sabotage_list():


    improvement_iterate(pimprove) {
      if (!BV_ISSET(improvements, improvement_index(pimprove))) {
        update_improvement_from_packet(pcity, pimprove, FALSE);
      }
    } improvement_iterate_end;

    popup_sabotage_dialog(pcity);


That seems odd -- it will only ever remove buildings from a client's idea of
a city's contents, never add them. I think it could cause the symptom
described; either you've previously investigated a city (in which case you'll
already have a more or less accurate building list), or you haven't (in which
case you'll only see the "public" buildings like City Walls or Palace).

The code's been like this since r13297
<http://svn.gna.org/viewcvs/freeciv?view=rev&revision=13297>, PR#39553
<http://bugs.freeciv.org/Ticket/Display.html?id=39553> (between 2.1.x and
2.2.x); before that it did essentially a straight copy. There's no indication
in the PR that this was an intentional change, so I think it was an accident.

Patch attached, which fixes the issue with my savegame.

(file #11537, file #11538)
    _______________________________________________________

Additional Item Attachment:

File name: trunk-S2_3-S2_2-sabotage-dialog.diff Size:0 KB
File name: spy_sabotage.sav.bz2           Size:21 KB


    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?17280>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to