Complete.Org: Mailing Lists: Archives: freeciv-ai: August 2003:
[freeciv-ai] Re: [Freeciv-Dev] (PR#5294) New core in cvs server
Home

[freeciv-ai] Re: [Freeciv-Dev] (PR#5294) New core in cvs server

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: paul@xxxxxxxxxxxxx
Subject: [freeciv-ai] Re: [Freeciv-Dev] (PR#5294) New core in cvs server
From: "Gregory Berkolaiko" <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Sat, 30 Aug 2003 11:26:09 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Thu, 21 Aug 2003, Paul Zastoupil wrote:

> Reproducable.  Same savegame as before (the helo one that Greg fixed).
> http://pubserver.freeciv.org/~paulz/pdz.gz
> 
> Connect as Petr, start, hard, ai petr, crash boom bang.

AI crashes when it gets a helicopter.

Attached is a fix for the bug.  The real fix is to teach the AI use 
helicopters, but we need to stop the crashes first.

G.

Index: ai/aiunit.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/aiunit.c,v
retrieving revision 1.284
diff -u -r1.284 aiunit.c
--- ai/aiunit.c 2003/08/26 09:05:42     1.284
+++ ai/aiunit.c 2003/08/30 18:23:55
@@ -2941,6 +2941,10 @@
   } else if (is_air_unit(punit)) {
     ai_manage_airunit(pplayer, punit);
     return;
+  } else if (is_heli_unit(punit)) {
+    /* TODO: We can try using air-unit code for helicopters, just
+     * pretend they have fuel = HP / 3 or something. */
+    return;
   } else if (is_military_unit(punit)) {
     if (punit->moves_left == 0) return; /* can't do anything with no moves */
     ai_manage_military(pplayer,punit); 

[Prev in Thread] Current Thread [Next in Thread]
  • [freeciv-ai] Re: [Freeciv-Dev] (PR#5294) New core in cvs server, Gregory Berkolaiko <=