patchBattle for Wesnoth - Patches: patch #2241, bug #16820: [kill] with...

 
 
Show feedback again

patch #2241: bug #16820: [kill] with fire_event=yes doesn't trigger end of scenario

Submitted by:  Samael <jinjubei>
Submitted on:  Mon 06 Dec 2010 05:01:00 PM UTC  
Votes:  10  
 
Priority: 5 - NormalStatus: Wont Do
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 17 Oct 2011 05:49:51 PM UTC, comment #5:

Closing as won't do due to mentioned problems and submitter is MIA.

Anonymissimus <anonymissimus>
Project Member
Wed 13 Apr 2011 05:26:30 PM UTC, comment #4:

jinjubei, did you have a look at the issues pointed by silene ?

if you are not willing to work some more on this i'll close the patch as won't do...

Jérémy Rosen <boucman>
Project Member
Sun 12 Dec 2010 12:07:06 PM UTC, comment #3:

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.

Guillaume Melquiond <silene>
Sun 12 Dec 2010 05:12:14 AM UTC, comment #2:

This patch does indeed work. (Tested with the Two_Brothers campaign)

Dr. Robert Marmorstein <atomopawn>
Sun 12 Dec 2010 01:21:06 AM UTC, comment #1:

I tested this patch by modifying the first scenario of the Two_Brothers campaign to kill Arne on turn 6 and use fire_event=yes. It does the trick!

Dr. Robert Marmorstein <atomopawn>
Mon 06 Dec 2010 05:01:00 PM UTC, original submission:

An attempt to fix this bug.

Samael <jinjubei>

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by anonymissimus (Posted a comment)
  • -unavailable- added by boucman (Posted a comment)
  • -unavailable- added by silene (Posted a comment)
  • -unavailable- added by atomopawn (Posted a comment)
  • -unavailable- added by atomopawn (Voted in favor of this item)
  • -unavailable- added by jinjubei (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 10 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 17 Oct 2011 05:49:51 PM UTCanonymissimusStatusIn Progress=>Wont Do
      Open/ClosedOpen=>Closed
    Wed 13 Apr 2011 05:26:30 PM UTCboucmanStatusNone=>In Progress
    Sat 11 Dec 2010 09:37:38 PM UTCatomopawnCarbon-Copy-=>Added atomopawn
    Mon 06 Dec 2010 05:01:00 PM UTCjinjubeiAttached File-=>Added mypatch.patch, #11482
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup