Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2005:
[Freeciv-Dev] Re: (PR#14905) Three shared vision inconsistencies
Home

[Freeciv-Dev] Re: (PR#14905) Three shared vision inconsistencies

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: guillaume.melquiond@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#14905) Three shared vision inconsistencies
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Tue, 27 Dec 2005 04:48:13 -0800
Reply-to: bugs@xxxxxxxxxxx

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

On Mon, 19 Dec 2005, Jason Short wrote:
> Cancelling shared vision should not require senate approval.

Yep. Patch attached.

  - Per

Index: server/plrhand.c
===================================================================
--- server/plrhand.c    (revision 11400)
+++ server/plrhand.c    (working copy)
@@ -509,6 +509,17 @@
   old_type = pplayer->diplstates[other_player_id].type;
   pplayer2 = get_player(other_player_id);
 
+  if (clause == CLAUSE_VISION) {
+    if (!gives_shared_vision(pplayer, pplayer2)) {
+      return;
+    }
+    remove_shared_vision(pplayer, pplayer2);
+    notify_player(pplayer2, NULL, E_TREATY_BROKEN,
+                     _("%s no longer gives us shared vision!"),
+                     pplayer->name);
+    return;
+  }
+
   diplcheck = pplayer_can_cancel_treaty(pplayer, pplayer2);
 
   /* The senate may not allow you to break the treaty.  In this case you
@@ -526,17 +537,6 @@
     return;
   }
 
-  if (clause == CLAUSE_VISION) {
-    if (!gives_shared_vision(pplayer, pplayer2)) {
-      return;
-    }
-    remove_shared_vision(pplayer, pplayer2);
-    notify_player(pplayer2, NULL, E_TREATY_BROKEN,
-                     _("%s no longer gives us shared vision!"),
-                     pplayer->name);
-    return;
-  }
-
   reject_all_treaties(pplayer);
   reject_all_treaties(pplayer2);
   /* else, breaking a treaty */

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