Rewrote MOVE_UNIT in a somewhat better way.

This commit is contained in:
Lari Nieminen 2007-05-11 10:54:29 +00:00
parent 713e4194b0
commit d7334bdd61

View file

@ -286,31 +286,36 @@ message={MSG}
y=$MOVE_UNIT_temp.y
[/scroll_to]
[hide_unit]
x=$MOVE_UNIT_temp.x
y=$MOVE_UNIT_temp.y
[/hide_unit]
{VARIABLE_OP MOVE_UNIT_path_coords_x format ("$MOVE_UNIT_temp.x|,{TO_X}")}
{VARIABLE_OP MOVE_UNIT_path_coords_y format ("$MOVE_UNIT_temp.y|,{TO_Y}")}
{VARIABLE_OP x_coords format ("$MOVE_UNIT_temp.x|,{TO_X}")}
{VARIABLE_OP y_coords format ("$MOVE_UNIT_temp.y|,{TO_Y}")}
{VARIABLE MOVE_UNIT_temp.x {TO_X}}
{VARIABLE MOVE_UNIT_temp.y {TO_Y}}
[kill]
{FILTER}
animate=no
fire_event=no
[/kill]
[move_unit_fake]
type=$MOVE_UNIT_temp.type
x=$x_coords
y=$y_coords
side=$MOVE_UNIT_temp.side
x=$MOVE_UNIT_path_coords_x
y=$MOVE_UNIT_path_coords_y
[/move_unit_fake]
[teleport]
[filter]
{FILTER}
[/filter]
x,y={TO_X},{TO_Y}
[/teleport]
[unhide_unit][/unhide_unit]
[unstore_unit]
variable=MOVE_UNIT_temp
find_vacant=yes
[/unstore_unit]
[redraw][/redraw]
{CLEAR_VARIABLE MOVE_UNIT_temp}
{CLEAR_VARIABLE MOVE_UNIT_path_coords_x}
{CLEAR_VARIABLE MOVE_UNIT_path_coords_y}
#enddef
#define PUT_TO_RECALL_LIST FILTER