URL:
<http://gna.org/patch/?4839>
Summary: Cleanups in dai_is_unit_tired_waiting_boat()
Project: Freeciv
Submitted by: persia
Submitted on: Mon 23 Jun 2014 09:50:19 AM JST
Category: ai
Priority: 5 - Normal
Status: Ready For Test
Privacy: Public
Assigned to: persia
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Planned Release: 2.6.0
_______________________________________________________
Details:
This function was using continental comparison and move_type analysis to
determine if a unit was capable of going to a destination with some
inaccuracy. The attached patch replaces this with a call to goto_is_sane (a
function specifically designed to handle this sort of question).
While editing the function, I noticed a conditional commented to indicate it
was checking whether the unit was on it's home continent, but which actually
checked whether the unit was in it's home city, which I've adjusted to check
continent (this function is generally called to establish trade routes, and if
a unit is already on a different continent, it may as well establish a route
there, rather than trying to catch a boat and go somewhere else).
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Mon 23 Jun 2014 09:50:19 AM JST Name:
dai_is_unit_tired_waiting_boat-cleanups.patch Size: 1kB By: persia
<http://gna.org/patch/download.php?file_id=21121>
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?4839>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev