[Freeciv-Dev] Re: little fix
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
As I have said earlier resolve_unit_stack is nothing but one big bug, and
I will have a (tested:) ) patch shortly. (there is also 2 crash bugs in
it, as it assumes a player have a city at all, and it will teleport ships
to landlocked cities.) :)
-Thue
On Sun, 09 Apr 2000, Jeff Mallatt wrote:
>
> 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.
|
|