This is the mail archive of the xconq7@sources.redhat.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]
Other format: [Raw text]

Re: code in adjust_tooling_crossover?


On Fri, 2002-07-12 at 18:17, Hans Ronne wrote:
> You crashed because you used x and y that are uninitialized variables at
> this point in the function. So you end up anywhere, most likely outside the
> map, which explains the bad ttype warning. You need to use unit->x and
> unit->y instead.

And now it works!  I tested it a few times, and the engineers keep
moving until they land on a spot that a city won't vanish on.  Now if
only the AI would tell cities to build a few units other than engineers
(it seems that if both sides are under AI control, they almost always
build countless engineers and cities until one side resigns)...

Do you think that it would be worth doing the same thing for other
tables like ut_wrecks_on or ut_attrition?  It might also be a good idea
to stop colonizers from building on terrain that's inhospitable to the
colonizers (look in "fantasy" at what happens when serfs try to build in
swamp or mountains).  Of course, the AI should have a better
understanding of accidents and attrition in the first place.


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