[Freeciv-tickets] [freeciv] #47697: Counter description

Back to archive index
OSDN Ticket System norep****@osdn*****
Thu Apr 27 03:23:28 JST 2023


#47697: Counter description

  Open Date: 2023-03-26 19:49
Last Update: 2023-04-27 03:23

URL for this Ticket:
    https://osdn.net//projects/freeciv/ticket/47697
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=47697

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2023-04-27 03:23 Updated by: lachu

Comment:

Reply To cazfi
{{{
+void counters_free(void);
}}}

It's already declared in counters.h.

 ---

{{{
 void counters_init(void)
 {
+  if (0 < game.control.num_counters) {
+    counters_free();
+  }
}}}

I'm not sure if game.control.num_counters is initialized at all when _init() gets called the very first time. Also, I think counters follow (or they should follow) the common pattern that there's always matching _free() call for each _init(), so this kind of code should never be needed. One could make it an assert, if one suspects that _free() might have not been called properly: "fc_assert(game.control.num_counters == 0);"

0001-OSDN-47697-S-awomir-Lach-slawek-lach.art.pl.patch(3KB)
Repair bug in rulesave (use bad function) and changes in intiialization/deinitialization routines.


---------------------------------------------------------------------
Ticket Status:

      Reporter: cazfi
         Owner: (None)
          Type: Patches
        Status: Open
      Priority: 5 - Medium
     MileStone: S3_2 npf
     Component: General
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

If we're going to show known counter values to the user on the client side, we should provide also longer explanation for them instead of just name.
This ticket is about adding such explanation to the ruleset format, and communicating it to client.

-- 
Ticket information of Freeciv project
Freeciv Project is hosted on OSDN

Project URL: https://osdn.net/projects/freeciv/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/freeciv/ticket/47697
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=47697



More information about the Freeciv-tickets mailing list
Back to archive index