Author: cazfi
Date: Thu Jan 22 01:32:36 2015
New Revision: 27773

URL: http://svn.gna.org/viewcvs/freeciv?rev=27773&view=rev
Log:
Accept effect nreqs in compatibility ruleset loading mode only.

See patch #5652

Modified:
    trunk/server/ruleset.c

Modified: trunk/server/ruleset.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/ruleset.c?rev=27773&r1=27772&r2=27773&view=diff
==============================================================================
--- trunk/server/ruleset.c      (original)
+++ trunk/server/ruleset.c      Thu Jan 22 01:32:36 2015
@@ -4688,15 +4688,17 @@
       effect_req_append(peffect, *preq);
     } requirement_vector_iterate_end;
 
-    reqs = lookup_req_list(file, sec_name, "nreqs", type);
-    if (reqs == NULL) {
-      ok = FALSE;
-      break;
-    }
-    requirement_vector_iterate(reqs, preq) {
-      preq->present = !preq->present;
-      effect_req_append(peffect, *preq);
-    } requirement_vector_iterate_end;
+    if (compat->compat_mode) {
+      reqs = lookup_req_list(file, sec_name, "nreqs", type);
+      if (reqs == NULL) {
+        ok = FALSE;
+        break;
+      }
+      requirement_vector_iterate(reqs, preq) {
+        preq->present = !preq->present;
+        effect_req_append(peffect, *preq);
+      } requirement_vector_iterate_end;
+    }
   } section_list_iterate_end;
   section_list_destroy(sec);
 


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to