Follow-up Comment #3, patch #1303 (project freeciv):

> I don't know path finding code well enough to know if this is
> correct or not, but it looks suspicious:
>
>> + if (pos.turn == 0 || (pos.turn == 1 && pos.moves_left == 0)) {
>> + /* Reachable immediatly. */
>> + return 0;
>
> Is pos.moves_left = 0 in the beginning of the new turn or when
> turn ends?

This test would be correct, according to the function finalize_position():
> pos->moves_left %= param->move_rate;

But I changed this line to something clearer:
> + if (pos.total_MC <= our_speed) {
> + /* Reachable immediatly. */
> + return 0;

Updated to current trunk/.


(file #6762)
    _______________________________________________________

Additional Item Attachment:

File name: trunk_pf_ai2.diff.gz           Size:18 KB


    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?1303>

_______________________________________________
  Message posté via/par Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to