Keeping the move code as in the example above but adding the c_trace after to ensure a minimum value should fix that problem while avoiding "stuttering":

Code:
while(1)
{
   c_move(me,vector(my.move_vec_x,my.move_vec_y,my.move_vec_z),nullvector,IGNORE_ME|IGNORE_PASSABLE|GLIDE);

   floor_dist = c_trace(my.x,vector(my.x,my.y,my.z-1280),IGNORE_ME|IGNORE_PASSABLE|IGNORE_PASSENTS|IGNORE_MODELS|IGNORE_SPRITES|USE_BOX);

   if(floor_dist<4)
   {
      my.z = hit.z+4;
   }

   wait(1);
}



EDIT:
If that code still gives you problems to move, just separate the gravity movement from the normal movement in two different steps (with player movement first) so one does not effect the other like this:

Code:
while(1)
{
   //First Character Movement
   c_move(me,vector(my.move_vec_x,my.move_vec_y,0),nullvector,IGNORE_ME|IGNORE_PASSABLE|GLIDE);

   //Second Gravity Movement
   c_move(me,nullvector,vector(0,0,my.move_vec_z),IGNORE_ME|IGNORE_PASSABLE|GLIDE);

   //Get distance to floor
   floor_dist = c_trace(my.x,vector(my.x,my.y,my.z-1280),IGNORE_ME|IGNORE_PASSABLE|IGNORE_PASSENTS|IGNORE_MODELS|IGNORE_SPRITES|USE_BOX);
   //force a constant minumum distance to allow walking up, but avoid "stuttering"
   if(floor_dist<4)
   {
      my.z = hit.z+4;
   }

   wait(1);
}



EDIT2:
Also, I am not sure if you are using time_step with your "move_vec_x/y/z".
If you are planning on running the game on different computers other than the one you are using to program whith, your game will have problems at different framereates.

Here are a couple of recent threads that can help you out getting started with time_step:

http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=416746#Post416746

http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=417189#Post417189

If you have any problems with time_step I will probably check this thread again this evening or tomorrow.

Last edited by Carlos3DGS; 02/12/13 15:22.

"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