Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2004:
[Freeciv-Dev] (PR#4256) Client Crash in CVS 17/05/2003
Home

[Freeciv-Dev] (PR#4256) Client Crash in CVS 17/05/2003

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#4256) Client Crash in CVS 17/05/2003
From: "Guest" <rt-guest@xxxxxxxxxxx>
Date: Mon, 26 Jan 2004 12:57:47 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=4256 >

Here's another possible (but untested, as of yet) patch. 
 
 - Gregory Richards 
P.S.: I should make an account ;) 
--- aiunit.c    2004-01-26 12:28:20.000000000 -0800
+++ aiunit.c    2004-01-26 12:55:43.000000000 -0800
@@ -2586,6 +2586,13 @@
 
   CHECK_UNIT(punit);
 
+  /* Make sure the unit doesn't have orders - humans always have
+     precedence */
+  if (unit_has_orders(punit)) {
+    punit->ai.ai_role = AIUNIT_NONE;
+    return;
+  }
+
   /* retire useless barbarian units here, before calling the management
      function */
   if( is_barbarian(pplayer) ) {

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