I did not read the whole topic but you should change
while(rock)
{
wait(1);
vec_set(camera.x,rock.x);
c_move(rock,nullvector,vector(30*time_step,(key_a - key_d),(key_w - key_s)), GLIDE);
}
to
while(rock)
{
vec_set(camera.x,rock.x);
c_move(rock,nullvector,vector(30*time_step,(key_a - key_d),(key_w - key_s)), GLIDE);
wait(1);
}
I hope you see why the second version is the only one that's correct.