garrison_unit?

Jim Kingdon kingdon@panix.com
Thu Aug 1 17:46:00 GMT 2002


> I suspect that this branch is used by time.g so that when a city is
> upgraded, all of its occupants are transferred into the new city instead
> of vanishing along with the old city.  Although I'm not sure.

Hmm, that might come up although the code in garrison_unit would seem
to be more general.  Stanley Sutton is right - the code can never be
executed.  I think the intention is probably to set the "transport"
variable (which is done several lines down) before testing it.

Incidentally, the first thing I did in trying to read that code was
rename "unit" and "unit2" to descriptive names - I'd suggest doing the
same whenever you find code which has "unit", "unit2", and "unit3" - I
find it is really hard to read the code if I need to keep in my head
which one is unit3, which one is unit2, etc.



More information about the Xconq7 mailing list