The code already gets you the closest vertex. For the three left the calculations would be:
vert2=closest+1;
vert3=closest-verts_per_row;
vert4=closest-verts_per_row+1;

there are two special cases where this would not work so you need two "if" before the above calculations. one "if" in case you are in the first row of verts, and another "if" in case you are in the last column of verts.

if(closest<verts_per_row)
{
closest+=verts_per_row;
}

if(closest%verts_per_row==0)
{
closest--;
}

after that manipulate the verts as you do with closest_vert, but adding three extra lines to do the sam manipulation for vert2,vert3,vert4


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1