The ON_SIGHTING macro is possible to cause to disallow undo

Having trouble with the game? Report issues and get help here. Read this first!

Moderators: Forum Moderators, Developers

Forum rules
Before reporting issues in this section, you must read the following topic:
Post Reply
User avatar
SkyOne
Posts: 1310
Joined: January 3rd, 2009, 7:23 pm

The ON_SIGHTING macro is possible to cause to disallow undo

Post by SkyOne »

Well, it is not a huge problem, so I post it here (instead of reporting it to Gna-project).
I think that the location of the [else] + [allow_undo] tag in the ON_SIGHTING macro is not really correct. It should be inside of the [if] tag with the [have_unit] tag.

After I moved it, the scenario allows me undo as well. Here is how I changed:
Spoiler:
Fate of a Princess/feedback thread: "What is in own heart that is the most important, not who you are."
Drake Campaign: Brave Wings/feedback thread, Naga Campaign: Return of the Monster, Saurian Campaign: Across the Ocean
Northern Forces - now on 1.12 server
Anonymissimus
Inactive Developer
Posts: 2460
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: The ON_SIGHTING macro is possible to cause to disallow u

Post by Anonymissimus »

Should already be fixed (from 1.10.1 onwards).
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml startersPlan Your Advancements: mp mod
The Earth's Gut: sp campaignSettlers of Wesnoth: mp scenarioWesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
JaMiT
Developer
Posts: 511
Joined: January 22nd, 2012, 12:38 am

Re: The ON_SIGHTING macro is possible to cause to disallow u

Post by JaMiT »

SkyOne wrote:After I moved it, the scenario allows me undo as well.
Did you try undoing a move after the ON_SIGHTING triggers your event? Since you moved the [else] instead of copying it, you have just shifted the problem from before the triggering to after. (The solution in 1.10.1 allows undoing as an else clause to both if's.) To make your custom macro work as intended, you should restore the [else] tag you removed.
User avatar
SkyOne
Posts: 1310
Joined: January 3rd, 2009, 7:23 pm

Re: The ON_SIGHTING macro is possible to cause to disallow u

Post by SkyOne »

Anonymissimus wrote:Should already be fixed (from 1.10.1 onwards).
Thank you.
JaMiT wrote:
SkyOne wrote:After I moved it, the scenario allows me undo as well.
Did you try undoing a move after the ON_SIGHTING triggers your event? Since you moved the [else] instead of copying it, you have just shifted the problem from before the triggering to after. (The solution in 1.10.1 allows undoing as an else clause to both if's.) To make your custom macro work as intended, you should restore the [else] tag you removed.
Uh-oh, it seems you are right.
Thanks for telling it. Now, there is a reason to update the new editions. That is an advantage of UMC.:wink:
Fate of a Princess/feedback thread: "What is in own heart that is the most important, not who you are."
Drake Campaign: Brave Wings/feedback thread, Naga Campaign: Return of the Monster, Saurian Campaign: Across the Ocean
Northern Forces - now on 1.12 server
Post Reply