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

                 Summary: looping through [item]/[delay]/[removeitem] cause
temporary freezing
                 Project: Battle for Wesnoth
            Submitted by: None
            Submitted on: Monday 02/15/2010 at 22:01 CET
                Category: Bug
                Severity: 2 - Minor
                Priority: 5 - Normal
              Item Group: Graphics
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: [email protected]
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.7.13
        Operating System: Windows 7

    _______________________________________________________

Details:

when the loop gets to the 8th-9th unit, wesnoth freezes but the sound
continues to play in the background the correct number of times. wesnoth then
unfreezes and continues like normal. this code can be used to reproduce the
bug:

[event]
name=start

[set_menu_item]
id=healspell
description=healing

[filter_location]
[filter]
canrecruit=yes
side=1
[/filter]
[/filter_location]

[command]

[message]
speaker=narrator
message="Healing spell"

[option]
message="Done"
[command]
{VARIABLE caster 0}
[/command]
[/option]

[option]
message="5 hex radius"
[command]

[store_unit]
[filter]
[filter_location]
x,y=$x1,$y1
radius=5
[/filter_location]
[/filter]
variable=healer
[/store_unit]

{FOREACH healer i}

[sound]
name=magic-holy-1.ogg,magic-holy-2.ogg,magic-holy-

3.ogg,magic-holy-4.ogg,magic-holy-miss-1.ogg,magic-

holy-miss-2.ogg,magic-holy-miss-3.ogg,magic-holy-miss-

4.ogg
[/sound]

[item]
x=$healer[$i].x
y=$healer[$i].y
halo="halo/holy/light-beam-1.png"
[/item]
[delay]
time=50
[/delay]
[removeitem]
x=$healer[$i].x
y=$healer[$i].y
[/removeitem]

[item]
x=$healer[$i].x
y=$healer[$i].y
halo="halo/holy/light-beam-2.png"
[/item]
[delay]
time=50
[/delay]
[removeitem]
x=$healer[$i].x
y=$healer[$i].y
[/removeitem]

[item]
x=$healer[$i].x
y=$healer[$i].y
halo="halo/holy/light-beam-3.png"
[/item]
[delay]
time=50
[/delay]
[removeitem]
x=$healer[$i].x
y=$healer[$i].y
[/removeitem]

[item]
x=$healer[$i].x
y=$healer[$i].y
halo="halo/holy/light-beam-4.png"
[/item]
[delay]
time=50
[/delay]
[removeitem]
x=$healer[$i].x
y=$healer[$i].y
[/removeitem]

[item]
x=$healer[$i].x
y=$healer[$i].y
halo="halo/holy/light-beam-5.png"
[/item]
[delay]
time=50
[/delay]
[removeitem]
x=$healer[$i].x
y=$healer[$i].y
[/removeitem]

[item]
x=$healer[$i].x
y=$healer[$i].y
halo="halo/holy/light-beam-6.png"
[/item]
[delay]
time=50
[/delay]
[removeitem]
x=$healer[$i].x
y=$healer[$i].y
[/removeitem]

[item]
x=$healer[$i].x
y=$healer[$i].y
halo="halo/holy/light-beam-7.png"
[/item]
[delay]
time=50
[/delay]
[removeitem]
x=$healer[$i].x
y=$healer[$i].y
[/removeitem]

[item]
x=$healer[$i].x
y=$healer[$i].y
halo="halo/holy/light-beam-6.png"
[/item]
[delay]
time=50
[/delay]
[removeitem]
x=$healer[$i].x
y=$healer[$i].y
[/removeitem]

[item]
x=$healer[$i].x
y=$healer[$i].y
halo="halo/holy/light-beam-5.png"
[/item]
[delay]
time=50
[/delay]
[removeitem]
x=$healer[$i].x
y=$healer[$i].y
[/removeitem]

[item]
x=$healer[$i].x
y=$healer[$i].y
halo="halo/holy/light-beam-4.png"
[/item]
[delay]
time=50
[/delay]
[removeitem]
x=$healer[$i].x
y=$healer[$i].y
[/removeitem]

[item]
x=$healer[$i].x
y=$healer[$i].y
halo="halo/holy/light-beam-3.png"
[/item]
[delay]
time=50
[/delay]
[removeitem]
x=$healer[$i].x
y=$healer[$i].y
[/removeitem]

[item]
x=$healer[$i].x
y=$healer[$i].y
halo="halo/holy/light-beam-2.png"
[/item]
[delay]
time=50
[/delay]
[removeitem]
x=$healer[$i].x
y=$healer[$i].y
[/removeitem]

[item]
x=$healer[$i].x
y=$healer[$i].y
halo="halo/holy/light-beam-1.png"
[/item]
[delay]
time=50
[/delay]
[removeitem]
x=$healer[$i].x
y=$healer[$i].y
[/removeitem]
{NEXT i}

[/command]
[/option]

[/message]

[/command]

[/set_menu_item]

[/event]




    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


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

Reply via email to