Author: sveinung
Date: Thu Aug 13 14:52:31 2015
New Revision: 29485

URL: http://svn.gna.org/viewcvs/freeciv?rev=29485&view=rev
Log:
meta knowledge: seeing city internals isn't magic

Stop assuming that being able to see the internals of the target city makes
the player able to know what buildings other cities contain.

See bug #23774

Modified:
    trunk/common/metaknowledge.c

Modified: trunk/common/metaknowledge.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/metaknowledge.c?rev=29485&r1=29484&r2=29485&view=diff
==============================================================================
--- trunk/common/metaknowledge.c        (original)
+++ trunk/common/metaknowledge.c        Thu Aug 13 14:52:31 2015
@@ -366,12 +366,6 @@
   }
 
   if (req->source.kind == VUT_IMPROVEMENT) {
-    /* Anyone that can see city internals (like the owner) */
-    if (can_player_see_city_internals(pow_player, target_city)) {
-      return TRUE;
-    }
-
-    /* Cities not owned by pow_player */
     switch (req->range) {
     case REQ_RANGE_WORLD:
     case REQ_RANGE_ALLIANCE:
@@ -390,6 +384,11 @@
       return FALSE;
     case REQ_RANGE_CITY:
     case REQ_RANGE_LOCAL:
+      if (can_player_see_city_internals(pow_player, target_city)) {
+        /* Anyone that can see city internals (like the owner) */
+        return TRUE;
+      }
+
       /* Can't see invisible improvements in foreign cities. */
       if (!is_improvement_visible(req->source.value.building)) {
         return FALSE;


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

Reply via email to