I'm trying to move a camera along a path with this action:

action camera_path()
{
// create a dummy path entity
//me = ent_create(NULL,nullvector,NULL);
path_set(me,"path_000");
var dist = 0;
var vLastPos[3];
var vDir[3];
while(1)
{
// place the camera on the path
path_spline(me,camera.x,dist);
dist += 5*time_step;
// let the camera look ahead
vec_diff(vDir,camera.x,vLastPos);
vec_to_angle(camera.pan,vDir);
vec_set(vLastPos,camera.x);
wait(1);
}
}

But the camera has a shimmy if it moves in slow motion
dist += time_step;
if done at high speed is not noticeable
dist += 5*time_step;
How I can do to keep dancing the camera in slow motion?
Thank you.