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]

Re: Bug in "time" game


>> A long-term solution could be to give these cities a plan of type
>> PLAN_IMPROVING, which is used by advanced units (cities) in the Civ type
>> games that build improvements. You could argue that these time game cities
>> are doing something similar. There is a special game class for the time
>> game in the mplayer, so handling them as a special case should be easy.
>
>Yes, that does sound like a better way to fix the problem. I did try to
>change PLAN_PASSIVE to PLAN_IMPROVING in mplayer.c, but the units got
>stuck in a loop adding development tasks to themselves. I'm sure this
>wouldn't be hard to fix, but I needed to learn more about how the
>plans work before I felt I could tackle it...
>
I have now commited a fix for the time game to the CVS repository. The
reason why using PLAN_IMPROVING did not work was just a stupid bug in
plan_improve (plan.c) which did not execute queued tasks correctly. This
went unnoticed until now since advanced units, which were the only ones to
use this plan type, execute their tasks in run_construction at the start of
each turn instead. Thanks again for pointing out this problem. The hidden
bug in plan_improve could have caused us a lot of headache later.

I also fixed the bad mtype errors in non-civ2 games. It was just an
uninitialized variable in the new create_plan code.

Hans

Hans Ronne

hronne@pp.sbbs.se



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