Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2004:
[Freeciv-Dev] (PR#11224) change tile output into an array
Home

[Freeciv-Dev] (PR#11224) change tile output into an array

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#11224) change tile output into an array
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 29 Nov 2004 13:10:22 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=11224 >

Oops!  This is broken because the ruleset doesn't have all these values.
 This patch fixes it.  I will commit immediately.

-jason

Index: server/ruleset.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/ruleset.c,v
retrieving revision 1.203
diff -u -r1.203 ruleset.c
--- server/ruleset.c    29 Nov 2004 20:56:51 -0000      1.203
+++ server/ruleset.c    29 Nov 2004 21:09:45 -0000
@@ -1618,8 +1618,8 @@
       t->defense_bonus = secfile_lookup_int(file, "%s.defense_bonus", sec[i]);
 
       output_type_iterate(o) {
-       t->output[o] = secfile_lookup_int(file, "%s.%s", sec[i],
-                                         get_output_identifier(o));
+       t->output[o] = secfile_lookup_int_default(file, 0, "%s.%s", sec[i],
+                                                 get_output_identifier(o));
       } output_type_iterate_end;
 
       for (j = 0; j < MAX_NUM_SPECIALS; j++) {
@@ -1633,8 +1633,8 @@
        t->special[j].name = t->special[j].name_orig;
        output_type_iterate(o) {
          t->special[j].output[o]
-           = secfile_lookup_int(file, "%s.%s_special_%d", sec[i],
-                                get_output_identifier(o), j + 1);
+           = secfile_lookup_int_default(file, 0, "%s.%s_special_%d", sec[i],
+                                        get_output_identifier(o), j + 1);
        } output_type_iterate_end;
 
        sz_strlcpy(t->special[j].graphic_str,

[Prev in Thread] Current Thread [Next in Thread]