[Freeciv-Dev] [bug #14880] Client doesn't call role_unit_precalcs(), causing errors in help

2009-12-05 Thread pepeto

Update of bug #14880 (project freeciv):

Category:None => client 
  Status:None => Fixed  
 Assigned to:None => pepeto 
 Open/Closed:Open => Closed 
 Planned Release:None => 2.2.0  


___

Reply to this item at:

  

___
  Message posté via/par Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #14880] Client doesn't call role_unit_precalcs(), causing errors in help

2009-12-03 Thread Jacob Nevins

URL:
  

 Summary: Client doesn't call role_unit_precalcs(), causing
errors in help
 Project: Freeciv
Submitted by: jtn
Submitted on: Thursday 03/12/09 at 23:37
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: None

___

Details:

I spotted this due to errors in the help -- for instance, "Allows (null) to
build roads on river tiles." in help for Bridge Building, and absence of
"Allows all players with knowledge of Rocketry to build Nuclear units." from
help for Manhattan Project.

role_units_translations() was always returning NULL. Turns out that
num_role_units() was always returning 0, as its precalculated values had not
been initialised with role_unit_precalcs().

Fixed by calling role_unit_precalcs() when entering C_S_RUNNING in
set_client_state(). Not 100% sure this is the right fix, but I couldn't find
a better signal for the client having all the ruleset data. I've also added
some assertions to spot future instances of this error.

I think this may have crept in with the fix for bug #13799 (in October).

Not sure whether this could have broken anything else on the client -- not
spotted anything on a quick look.



___

File Attachments:


---
Date: Thursday 03/12/09 at 23:37  Name: help-null-role-unit-precalcs.diff 
Size: 2kB   By: jtn
Call role_unit_precalcs() in client; against S2_2 r16461


___

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