This is the mail archive of the xconq7@sourceware.cygnus.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bug in "time" game


AI controlled sides were not developing the technology to upgrade
their cities in the time.g game. Needless to say, this makes them
rather easy pushovers. It appears that the problem is that
the one city which was assigned to developing the technology
has a "passive" plan, which is explicitly disallowed.

A quick work-around seems to be the following patch. I'm new to
xconq, so I can't be sure that this has no side effects, but it
certainly allows me to play a more interesting game against the
computer :-).

(The patch is based on a Dec. 24 checkout of the CVS sources.
Later checkouts give me errors about bad mtypes when I try
to play...)

Index: plan.c
===================================================================
RCS file: /cvs/xconq/xconq/kernel/plan.c,v
retrieving revision 1.15
diff -u -r1.15 plan.c
--- plan.c      1999/12/08 03:13:10     1.15
+++ plan.c      2000/01/02 20:23:43
@@ -406,8 +406,12 @@

     /* Don't allow passive units under ai control. */
     if (side_has_ai(unit->side) && unit->plan->aicontrol) {
-       force_replan(unit->side, unit, FALSE);
-       return;
+       /* exception: allow development and upgrading in the "time" game
*/
+       if (plan->tasks == NULL || (plan->tasks->type != TASK_DEVELOP &&

+           plan->tasks->type != TASK_BUILD)) {
+           force_replan(unit->side, unit, FALSE);
+           return;
+       }
     }
     /* Special-case human cities/towns in the intro game to
automatically
        start producing infantry initially. */



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]