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".
Greetings Yogi Actually, unless the AI has changed significantly since I was last looking at it, this should never happen for the AI. This is because, prior to my work, the AI always played without fog. In other words, the AI should never have plotted a move that would be interrupted. While I made some underlying changes which would allow my AI to make plans that did not include information about hidden movements, those moves should be interrupted just like the human. So it seems to me that is_replay is redundant if we store the whole movement path. I fully support storing the whole movement path, and if it results in a unit moving through an illegal hex, there should be an OOS error thrown. Darthfool John, i think you are right except about one thing: If a human skirmisher is ambushed, the move is interrupted. As a skirmisher, the unit has the possibility to go on moving, of course. If it does so, the replay will store two separate moves. If an AI skirmisher is ambushed, it wont be interrupted and the replay will store one single move. Prior to the change in replay code, that wasnt a problem. But now that the replay code is calling the move function that was originally designed for human moves only, we need a way to tell it that the move must not be interrupted (for replays), even if the unit is ambushed. Greetings Yogi
_______________________________________________ Wesnoth-dev mailing list Wesnoth-dev@gna.org https://mail.gna.org/listinfo/wesnoth-dev