thank you, i thought i did that.
The Walking & running works, its just when i try to add a new movement the client seems to not be able to do it and copy the host,
this is my handle gravity function that is called in a while loop in the player.mdl's action.
FUNCTION handle_gravity()
{
trace_mode = ignore_me+ignore_passable+use_box;
result = trace(vector(my.x,my.y,my.z - my.z_offset),vector(my.x,my.y,my.z - 4000));
IF (result < 3) //Result is the distance from the player's feet to the ground, if it is below 0 then it means the trace was inside a
{ //block and result returns a negative value,
IF (my.jumping_mode == 0) {
my.force2_z = -1 * result;
IF (key_space == 0 && space_press == 1) { space_press = 0; }
IF (key_space == 1 && space_press == 0 && my.movement_mode == 0 && my.animblend >= stand && my.animblend != jump &&
my.animblend != fall) {
space_press = 1;
my.jumping_mode = 1;
my.force2_z = 25;
my.blendframe = jump;
my.animate2 = 0;
my.animblend = blend;
}
}
IF (my.jumping_mode == 2 || my.jumping_mode == 3) { my.jumping_mode = 0; }
} ELSE {
IF (my.jumping_mode == 2) {
IF (result > 120) {
my.animate = 60;
my.jumping_mode = 3;
} ELSE {
my.jumping_mode = 0;
}
}
IF (my.jumping_mode == 3 && result <= 120) { my.jumping_mode = 0; }
IF (my.jumping_mode == 0 && my.movement_mode == 0) {
IF (result > 120 && my.animblend >= stand && my.animblend != jump && my.animblend != fall) {
my.jumping_mode = 3;
my.blendframe = fall;
my.animate2 = 0;
my.animblend = blend;
}
}
my.force2_z -= 6 * time;
my.force2_z = max(-30,my.force2_z);
}
my.velocity_z += (time * my.force2_z) - (min(time*0.7,1) * my.velocity_z);
my.force_z = my.velocity_z * time;
}
does this help?
Last edited by RyuShinji; 02/19/08 18:58.