Clear the destroyed base from the bases array...

...without erasing the spawn tracking of all bases.
This commit is contained in:
Lari Nieminen 2011-01-15 08:47:54 +00:00
parent 5ab2bd041c
commit aabd799000

View File

@ -594,14 +594,25 @@ Soooo... It is you who sent your subordinates to attack us. Now when weve des
{PLACE_IMAGE scenery/village-human-burned4.png $x1 $y1} {PLACE_IMAGE scenery/village-human-burned4.png $x1 $y1}
# Remove the current location from the array # Remove the current location from the array
[store_locations] {FOREACH drake_bases i}
find_in=drake_bases [if]
[not] [variable]
x,y=$x1,$y1 name=drake_bases[$i].x
[/not] numerical_equals=$x1
[/variable]
variable=drake_bases [variable]
[/store_locations] name=drake_bases[$i].y
numerical_equals=$y1
[/variable]
[then]
{CLEAR_VARIABLE drake_bases[$i]}
{VARIABLE i 999}
[/then]
[/if]
{NEXT i}
[/event] [/event]
[event] [event]