<URL: http://bugs.freeciv.org/Ticket/Display.html?id=35641 >

On 2/10/07, Per I. Mathisen <[EMAIL PROTECTED]> wrote:
> This patch
>  * Removes the second parameter to find_transporter_for_unit(), which
> is already known.
>  * Adds function could_unit_load() which checks if a given transporter
> could add a unit as cargo, were it on the same tile.
>  * Since find_transporter_for_unit() calls can_unit_load(), it is
> meaningless to call the latter on results from the former. Remove such
> usages.
>  * Make use of all checks in could_unit_load() in
> find_transport_from_tile(), instead of the smaller and duplicating
> list of checks there, that seemed to make no sense.
> Can people who have touched this code, please take a look?

 I think you cannot check for is_native_tile() in could_unit_load()
(this was probably bug already in find_transport_from_tile()) It means
that you cannot load to boat in coastal city.
 You could check that transport can_unit_exist_at_tile(), but I don't
think that is necessary. can_unit_exist_at_tile() would return FALSE
only if we attempt recursive transportation, which is prohibited by
other means already. Assert, maybe?

 - ML

Freeciv-dev mailing list

Reply via email to