Follow-up Comment #3, patch #2241 (project wesnoth):

check_victory can't be called from anywhere. (The engine is not
exception-safe.) It can only be called from some very specific places where we
are sure there is no pending actions. WML is definitely not such a place.

Currently, check_victory is called at the end of every attack and every turn
side. To fix the original bug, check_victory should also be called after every
unit move (since the issue is caused by killing a unit in a moveto event).

One also has to make sure that the same behavior happens whether the unit is
moved by the user, the AI, the network, or the replay. Putting the call in the
src/actions.cpp:move_unit function might be a good place, but one should check
all its caller to verify that they are safe to be interrupted by an exception.

    _______________________________________________________

Reply to this item at:

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

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


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to