Author: sveinung
Date: Fri Mar 27 14:58:25 2015
New Revision: 28634

URL: http://svn.gna.org/viewcvs/freeciv?rev=28634&view=rev
Log:
An already known tech is reachable even if its research_reqs are false.

There is no need to research it since it already is researched.

See patch #5951

Modified:
    trunk/common/research.c

Modified: trunk/common/research.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/research.c?rev=28634&r1=28633&r2=28634&view=diff
==============================================================================
--- trunk/common/research.c     (original)
+++ trunk/common/research.c     Fri Mar 27 14:58:25 2015
@@ -348,10 +348,12 @@
   /* Check that all recursive requirements have their research_reqs
    * in order. */
   for (i = 0; i < techs_num; i++) {
-    if (!research_is_allowed(presearch, techs[i])) {
+    if (presearch->inventions[techs[i]].state != TECH_KNOWN
+        && !research_is_allowed(presearch, techs[i])) {
       /* It is currently illegal to start researching this tech. Since
        * only unchanging requirements are allowed the situation will
-       * continue. */
+       * continue. Since it isn't already known and can't be researched
+       * it must be unreachable. */
       return FALSE;
     }
 


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

Reply via email to