URL:
  <http://gna.org/bugs/?23600>

                 Summary: sighted events still unsafe (can cause OOS)
                 Project: Battle for Wesnoth
            Submitted by: None
            Submitted on: Di 19 Mai 2015 00:16:57 UTC
                Category: Bug
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: WML
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.13.0, 1.12.x
        Operating System: all

    _______________________________________________________

Details:

assume this situation:
Player1 has 2 units U1 (on 10,1) and U2 on (2,2), Player2 has a unit U3 (on
10,10). It is Player1s turn. Player1 has DSU (= Delayed Shroud Updates)
activated. Player1 can not see unit U3. There is an event like this:


[event]
        name = "sighted"
        [filter_condition]
                [not]
                        [have_unit]
                                x,y = 1,1
                        [/have_unit]
                [/not]
        [/filter_condition]
        [filter]
                side = 2
        [/filter]
        [message]
                speaker = "narrator"
                message = "message1"
        [/message]
[/event]



Now Player1 does the following:
1) He moves U1 to (10,6) so that U1 would see U3 if DSU were not activated.
2) He moves U2 to (1,1) which would not reveal any shroud/fog event if DSU
were not activated. 
3) He presses update shroud. U3 becomes visible and the event does not fire
because there is a unit on (1,1) so no message is displayed.
4) He undoes the move of U2 which is possible because this move did not
discover anything and did not fire any events.


But in the replay the move from U2 did not happen (it was undone) so the event
fires and message is displayed. In this case were it is just a message it
surely isn’t important but you can easily replace the [message] with
something different which would then cause a real OOS.

Here a test scenario to cause this OOS, in order to test this bug you must
activate DSU before doing any moves:


[scenario]
        id= "01_DSU_OOS_TEST"
        next_scenario = 01_DSU_OOS_TEST
        name= _ "SP DSU OOS Test"
        description= _ "This secnario is for testing oos errors"
        map_data = "
Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg
Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg
Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg
Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg
Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg
Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg
Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg
Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg
Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg
Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg
Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg
Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gg
"
        {DEFAULT_SCHEDULE}
        [side]
                defeat_condition = "never"
                side = 1
                controller = "human"
                no_leader = yes
                shroud = yes
                fog = yes
                [unit]
                        type = "Elvish Archer"
                        x,y = 10,1
                [/unit]
                [unit]
                        type = "Elvish Archer"
                        x,y = 2,2
                [/unit]
        [/side] 
        
        [side]
                no_leader = yes
                defeat_condition = "never"
                side = 2
                controller = "human"
                shroud = yes
                fog = yes
                [unit]
                        type = "Elvish Archer"
                        x,y = 10,10
                [/unit]
        [/side]

        [event]
                name = "sighted"
                [filter]
                        side = 2
                [/filter]
                [filter_condition]
                [not]
                        [have_unit]
                                x,y = 1,1
                        [/have_unit]
                [/not]
                [/filter_condition]
                [message]
                        speaker = "narrator"
                        message = "message1"
                [/message]
        [/event]
[/scenario]








    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?23600>

_______________________________________________
  Nachricht gesendet von/durch Gna!
  http://gna.org/


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

Reply via email to