Follow-up Comment #4, bug #13118 (project wesnoth):

alink, i see i misunderstood you about an important point. I thought you
wanted to skip the actions.cpp::move_unit call altogether and return to the
old behaviour. Looking at your patch I saw this is not the case.

I actually wasn't aware about the connections between fog and pathfinding.
That is indeed a major reason not to try to synchronize pathfinding on all
clients.
Furthermore, your patch removes the pathfinding logic of replay moves in
replay.cpp, which I think is a good thing as well. I thought about that
quickly myself when I was reworking that part, but couldn't find an easy way
to do it, so I left it standing the way it is. But I am happy to see it
vanish.

One last comment: When calling actions.cpp::move_unit the last parameter
(is_replay) is meant to continue moves which would otherwise be interrupted
(which they should not in a replay). 
This might happen, if the AI moves and a skirmishing unit is ambushed. The
move will be interrupted for a human (which actions.cpp::move_unit was
originally designed to deal with), but not for the AI (which has its own
moving code). So please add that parameter to the call since the default
value is "false".

@Ivanovic:
I leave this up to you, since this will break compatibility with the current
release (any replay before this patch won't work at all). 
However, I strongly recommend to apply this patch since I feel it will make
the code a lot more robust and prevent having to deal with some very nasty,
hard to detect and reproduce bugs in the future.
As alink mentioned before, we can continue to support the old replay format
(source and destination instead of a route). 
There are two hearts about this in my chest: The coder says "no, don't
introduce some temporary stuff that has potential for a lot of problems",
the community member says "people might be pretty pissed off, if all their
replays don't work anymore :(". As this is still a release candidate,
personally I'd let the coder win, to be honest.

Greetings

Yogi



_______________________________________________
Wesnoth-dev mailing list
Wesnoth-dev@gna.org
https://mail.gna.org/listinfo/wesnoth-dev

Reply via email to