action act_plane_proptrail()
{
var last_speed;
set(me, PASSABLE);
ent_scale(me, 0.03);
vec_set(my.pan, vector(0.01, 0.01, 0.01));
while(ent_player[MY_CLIENTID] == NULL)
{
wait(1);
}
you = ent_player[MY_CLIENTID];
while(ent_player[MY_CLIENTID] != NULL)
{
vec_for_vertex(my.x, you, 34);
vec_set(my.pan, vector(you.pan, you.tilt, my.roll));
if(last_speed > 5 && you.speed <= 5)
{
reset(me, TRANSLUCENT);
my.alpha = 100;
ent_scale(me, 0.03);
ent_morph(me, "propeller_ruhig.bmp");
}
if(you.speed <= 5)
{
my.roll += you.speed * plane_propellerRotationScale * time_step;
}
else
{
if(last_speed <= 5 && you.speed > 5)
{
set(me, TRANSLUCENT);
my.alpha = 100;
ent_scale(me, 0.055);
ent_morph(me, "propeller_lauf.tga");
}
}
if(you.speed > 5)
{
my.roll += you.speed * 0.01 * plane_propellerRotationScale * time_step;
}
last_speed = you.speed;
wait(1);
}
}