action leaf() {
my.flags |= FLAG2;
var accUp = 0;
var accDown = -0.5;
while(me) {
if (w_speed_current > 0.3) {
accUp = w_speed_current * 2;
my.roll += 2;
my.tilt += 5;
} else {
if (w_speed_current > 0) {
my.roll += 2;
my.tilt += 5;
} else {
my.tilt = 90;
}
accUp = 0;
}
vec_to_angle(my.pan, d_direction_current);
accDown = -0.5 - random(1);
c_move(me, vector((d_direction_current.x+random(2))*w_speed_current*0.5, (d_direction_current.y+random(2))*w_speed_current*0.5, accUp),vector(0,0,accDown), IGNORE_PASSABLE | IGNORE_PASSENTS | GLIDE);
wait(1);
}
}