///////////////////////////////
#include <acknex.h>
#include <default.c>
#include "pathfinding.c"
///////////////////////////////
ENTITY* getme;
VECTOR mouse_target,temp,temp2;
void main()
{
fps_max = 60;
video_mode = 9;
ent_path_init();
level_load("test.WMB");
}
action dummy()
{
getme=my;
}
action path_test2()
{
while(1)
{
ent_path_get_target(my,getme.x,temp);
if(vec_dist(temp,my.x) > 16)
{
//turn to temp;
//move to temp;
vec_diff(temp2,temp,my.x);
vec_to_angle(temp,temp2);
my.pan += ang(temp.x-my.pan)*0.5*time_step;
result = c_move(me,vector(maxv(10-0.1*abs(ang(temp.x-my.pan)),0)*time_step,0,0),nullvector,IGNORE_PASSABLE | GLIDE);
my.skill1 += result;
my.skill1 %= 100;
ent_animate(me,"run",my.skill1,ANM_CYCLE);
}
wait(1);
}
}