On Wed, 15 Dec 2021 00:36:35 +0100 (CET)
Stefan Fellner <stefan.fell...@tutanota.com> wrote:
> I did a bit debugging on goto orders. 
> I attached a save game, hope this works :)

I have the save, and appreciate the test case. However the patch does not
apply to current trunk.

459 Malbec] patch -p1 < ~/improve-goto-orders.patch 
patching file src/net/sf/freecol/client/control/InGameController.java
Hunk #1 FAILED at 121.
Hunk #2 succeeded at 165 (offset -14 lines).
Hunk #3 succeeded at 783 (offset -14 lines).
Hunk #4 succeeded at 818 (offset -14 lines).
Hunk #5 succeeded at 920 (offset -14 lines).
Hunk #6 FAILED at 969.
Hunk #7 succeeded at 1015 (offset -14 lines).
2 out of 7 hunks FAILED -- saving rejects to file 
src/net/sf/freecol/client/control/InGameController.java.rej

I suspect you have been doing a bunch of other incompatible clean ups!

> After that the goto-orders get executed, and the next unit is the privateer 
> up north, which has goto orders going north further.
> They get executed, next unit is a seasoned scout, which goto gets also 
> executed, but then the view changes back to the privateer - which does NOT 
> require attention. 
> Afterwards there would be more goto units, plus the scout really needs 
> attention, has a turn left.

Can not reproduce.  This is what I see:

1. Load game, pioneer selected
2. Hit R to build road, or space, or W
3. Privateer moves
4. Scout moves
5. Colonist moves to Guadeloupe and the colony panel pops up, stopping the
goto moves
6. Hit wait again, more goto moves occur, ending with the scout with 1/4
moves left

> So the problem in the code IMHO is, that the method IGC#moveDirection returns 
> the NO_MORE_MOVES as an illegal move, thus propagating to the 
> movePath/moveToDestination/doExecuteGotoOrders that the unit requires player 
> interaction, thus interrupting the goto unit orders loop and changing the 
> view to the privateer.

That makes sense.  MoveType used to be a lot simpler, and no more moves
was conflated with several other failure conditions.  I worked around the
patch fail, but did not see any difference to the above result.
Nevertheless, I am convinced by the logic, so my lightweight version is
committed (git.6bfc4ff36d).

And with that, consider yourself as having sent sufficient patches.
What is your sourceforge username?  I am only seeing tutanota addresses
from you.

Cheers,
Mike Pope

Attachment: pgpFW9W7wRlH8.pgp
Description: OpenPGP digital signature

_______________________________________________
Freecol-developers mailing list
Freecol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freecol-developers

Reply via email to