[Freeciv-Dev] Re: little fix
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
At 2000/04/06 13:03 , Thue Janus Kristensen wrote:
>The function is_enough_transporter_space(struct player *pplayer, int x,
>int y) only counts the players transporters, but counts all units as
>cargo. (it is currently only used where only one players units are on the
>tile so this won't fix any bugs)
I changed the old name of the variable from "total_capacity" to
"availability". The old name confused me so badly, I mis-interpreted the
new code the first time I looked at it :)
I also changed is_transporter_with_free_space() to report only on given
players' units (as it seems was intended).
Also, while looking at how is_enough_transporter_space() was called, it
seemed to me that there was a bug in the code near the end of
resolve_unit_stack() -- the comment says to teleport the *surplus* units,
but the code teleports *all* units. The attached patch also fixes this.
transporter-space-fix-3.diff
Description: Text document
jjm
- [Freeciv-Dev] Re: little fix,
Jeff Mallatt <=
|
|