close
function move_player()
{
set disconnectable;
my.nosend_frame = on; // don't send animation
send player_number and num_of_player to all client;
// this code is to solve high latency creation problem
sleep(.3); // this can be left at .3 no matter what
ent_sendnow(my);
sleep(.3); // sleep(3); // high latency solution for now
if(connection != 2) set the profession properties;
while(1)
{
my.prev_anim_state = my.animation_state; // save animation state
my.animation_state = ANIMATION_STATE_WALK; // initial set to walk
judge the animation is changed or not;
if(my.animation_state != my.prev_anim_state) // if changed
{
send_skill(my.animation_state,SEND_ALL);
}
move player according the forces;
wait(1);
}
}
{
set disconnectable;
my.nosend_frame = on; // don't send animation
send player_number and num_of_player to all client;
// this code is to solve high latency creation problem
sleep(.3); // this can be left at .3 no matter what
ent_sendnow(my);
sleep(.3); // sleep(3); // high latency solution for now
if(connection != 2) set the profession properties;
while(1)
{
my.prev_anim_state = my.animation_state; // save animation state
my.animation_state = ANIMATION_STATE_WALK; // initial set to walk
judge the animation is changed or not;
if(my.animation_state != my.prev_anim_state) // if changed
{
send_skill(my.animation_state,SEND_ALL);
}
move player according the forces;
wait(1);
}
}
全站熱搜
留言列表