[Freeciv-Dev] [bug #17280] The list of buildings to sabotage is often not complete.

2010-12-12 Thread Jacob Nevins

Update of bug #17280 (project freeciv):

  Status:  Ready For Test => Fixed  
 Open/Closed:Open => Closed 


___

Reply to this item at:

  

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


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


[Freeciv-Dev] [bug #17280] The list of buildings to sabotage is often not complete.

2010-12-10 Thread Jacob Nevins

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
, PR#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:

  

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


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


[Freeciv-Dev] [bug #17280] The list of buildings to sabotage is often not complete.

2010-12-10 Thread Jacob Nevins

Follow-up Comment #1, bug #17280 (project freeciv):

Which client are you using?

___

Reply to this item at:

  

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


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


[Freeciv-Dev] [bug #17280] The list of buildings to sabotage is often not complete.

2010-12-08 Thread anonymous

URL:
  

 Summary: The list of buildings to sabotage is often not
complete.
 Project: Freeciv
Submitted by: None
Submitted on: Thu Dec  9 03:42:59 2010
Category: None
Severity: 2 - Minor
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 2.2.3
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

When attempting to sabotage a city the initial popup window which lists the
buildings inside is often not correct. I would estimate it fails to show the
complete list about one time in three. The shorter list always shows a single
building - the city walls. If you choose to sabotage at random from this
shortened list you may destroy one of the actual buildings inside that wasn't
shown on the list. Hence this is purely a display issue, it doesn't effect
your chances at sabotage. 




___

Reply to this item at:

  

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


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