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}
# Remove the current location from the array
[store_locations]
find_in=drake_bases
[not]
x,y=$x1,$y1
[/not]
{FOREACH drake_bases i}
[if]
[variable]
name=drake_bases[$i].x
numerical_equals=$x1
[/variable]
variable=drake_bases
[/store_locations]
[variable]
name=drake_bases[$i].y
numerical_equals=$y1
[/variable]
[then]
{CLEAR_VARIABLE drake_bases[$i]}
{VARIABLE i 999}
[/then]
[/if]
{NEXT i}
[/event]
[event]