Complete.Org: Mailing Lists: Archives: freeciv-ai: May 2003:
[freeciv-ai] Re: (PR#4137) Auto-Explore with new path-finding
Home

[freeciv-ai] Re: (PR#4137) Auto-Explore with new path-finding

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: cameron@xxxxxxxxxx
Subject: [freeciv-ai] Re: (PR#4137) Auto-Explore with new path-finding
From: "Gregory Berkolaiko" <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Mon, 12 May 2003 03:26:06 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Sat, 10 May 2003, Cameron Morland wrote:

> On Sat, May 10, 2003 at 10:42:52AM -0700, Gregory Berkolaiko wrote:
> > 2.
> > +  } else {
> > +    /* idle to wake the unit. */
> > +    handle_unit_activity_request(punit, ACTIVITY_IDLE);
> > +    return FALSE;
> >    }
> > 
> > is wrong and unnecessary.  Right below it, you ask whether we need this 
> > idle.  Yes we do, otherwise human-owned explorers won't wake up once the 
> > are finished exploring.  But this is a wrong place to do it.  Attached is 
> > a mini-patch (please do it properly) which moves the IDLING to the right 
> > place.
> 
> Did you forget to attach the mini-patch?

Right.

G.

? ttt.gz
? ai/aisettler.c
? ai/aisettler.h
? ai/aiunit.cy
? common/aicore/citymap.c
? common/aicore/citymap.h
Index: ai/aiunit.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/aiunit.c,v
retrieving revision 1.275
diff -u -r1.275 aiunit.c
--- ai/aiunit.c 2003/05/06 06:02:49     1.275
+++ ai/aiunit.c 2003/05/10 17:35:18
@@ -684,7 +684,7 @@
    */
   UNIT_LOG(LOG_DEBUG, punit, "failed to explore more");
   if (punit->activity == ACTIVITY_EXPLORE) {
-    handle_unit_activity_request(punit, ACTIVITY_IDLE);
+//    handle_unit_activity_request(punit, ACTIVITY_IDLE);
   }
   
   /* 
Index: server/unithand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/unithand.c,v
retrieving revision 1.259
diff -u -r1.259 unithand.c
--- server/unithand.c   2003/05/06 08:13:21     1.259
+++ server/unithand.c   2003/05/10 17:35:18
@@ -637,6 +637,7 @@
           * it. */
           set_unit_activity(punit, ACTIVITY_EXPLORE);
         } else {
+          set_unit_activity(punit, ACTIVITY_IDLE);
           punit->ai.control = FALSE;
         }
         send_unit_info(NULL, punit);
Index: server/unittools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/unittools.c,v
retrieving revision 1.222
diff -u -r1.222 unittools.c
--- server/unittools.c  2003/05/06 08:13:21     1.222
+++ server/unittools.c  2003/05/10 17:35:19
@@ -745,6 +745,8 @@
 
     if (more_to_explore) {
       handle_unit_activity_request(punit, ACTIVITY_EXPLORE);
+    } else {
+      handle_unit_activity_request(punit, ACTIVITY_IDLE);
     }
     send_unit_info(NULL, punit);
     return;

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