[comp.sources.games.bugs] xconq5.1 fuel transfer "feature" fix.

warkent@ltisun7.epfl.ch (Ken Warkentyne) (08/29/90)

Some recent postings mention the problem with fuel transfer.  The problem
is easy to fix.  This applies to v5.1 but may also work on the unofficial
"5.3" that people have been talking about.

Replace can_satisfy_need in phases.c with the following:

------------------------ cut here -------------------------------
/* This estimates what can be spared.  Note that total transfer of requested */
/* amount is not a good idea, since the supplies might be essential to the */
/* unit that has them first.  If the request leaves us with at least half */
/* of maximum capacity or the request is less than 1/5 of our supply, then */
/* we  can spare it. */

can_satisfy_need(unit, r, need)
Unit *unit;
int r, need;
{
    return ((unit->supply[r]-need) >= (utypes[unit->type].storage[r]/2)) ||
	    (need < (unit->supply[r] / 5));
}

lawf@bae.Berkeley.EDU (Lawrence Fan(BAE)) (09/08/90)

I have been looking for the new version of xconq with no success.
Can anyone point me to an archive where it is kept?  What is the
latest version of xconq?  Did someone mention 5.1 or 5.3?
Thanks in advance.

-------------------------------------------------------------------------------
Lawrence Fan                                       Bell Communications Research
lawf@cellar.bae.bellcore.com                              Phone: (201)-699-5026
rutgers!bellcore!cellar!lawf
Room 1C-206 444 Hoes Lane, Piscataway, NJ 08873