Code:

function proj_scanfront(scandist)
{
vec_set(temp,vector(scandist,0,0));
vec_rotate(temp,my.pan);
vec_add(temp,my.x);

c_trace(my.x, temp, ignore_me + ignore_passable + scan_texture);

// reposition at the target
vec_set(scanstore, target);
vec_set(my.x, scanstore.x);
}