<URL: http://bugs.freeciv.org/Ticket/Display.html?id=35641 >
Per I. Mathisen wrote: > <URL: http://bugs.freeciv.org/Ticket/Display.html?id=35641 > > > 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? Seems okay. The likely reason for the extra parameter for find_transporter_for_unit is unit movement - but the unittools change you make looks fine since the unit's tile has already been changed by this point. -jason _______________________________________________ Freeciv-dev mailing list [email protected] https://mail.gna.org/listinfo/freeciv-dev
