<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39387 >

For MATCH_FULL, default to last entry.  This allows use in higher layers
without adding a match_type to every entry, and allows a default match
instead of requiring a unique match for every entry.

In the case at hand, this allows use on layer1 for land entries that
only have a layer0 base, and "land" to also match "mountains", "hills",
etc.  Essentially saves a layer!

Index: client/tilespec.c
===================================================================
--- client/tilespec.c   (revision 13107)
+++ client/tilespec.c   (working copy)
@@ -3865,15 +3865,16 @@
          break;
        case MATCH_FULL:
        default:
-         if (m[0] != -1 && m[1] != -1 && m[2] != -1) {
+         {
            int n[3];
            int j = 0;
            for (; j < 3; j++) {
              int k = 0;
              for (; k < count; k++) {
+               n[j] = k; /* default to last entry */
                if (m[j] == dlp->match_index[k])
                {
-                 n[j] = k;
+                 break;
                }
              }
            }
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to