That's because pkmnfrk is modifying x,y coordinates based off floats instead of storing them in a seperate variable (such as Vx, Vy), I think. Try changing it to this->V and see if that works, or, use this instead:
Code:
void Homing(int speed, int ffc_num, int target_x, int target_y){
ffc F=Screen->LoadFFC(ffc_num);
int dx = target_x - F->X;
int dy = target_x - F->Y;
float norm = Sqrt(dx*dx+dy*dy);
if(norm > 0){
F->Vx = dx/norm*speed;
F->Vy = dy/norm*speed;
}
}
edit: Had a spontanious idea to make it better. (untested):
Code:
void Homing(int speed, ffc f, int target_x, int target_y){
ffc F=f;
int dx = target_x - F->X;
int dy = target_x - F->Y;
float norm = Sqrt(dx*dx+dy*dy);
if(norm > 0){
F->Vx = dx/norm*speed;
F->Vy = dy/norm*speed;
}
}