Well codes below is raped from mq2move utils circle command, it's work great while your circling clockwise foward, good for bard kiting, but for my zerker i want to be able to circle backward, facing mobs all the time going anti-clockwise around the circle, and well this functions doesnt do the jobs ... work partially for a while ...
Code: Select all
double heading;
double CircleRadius = 25.0f;
double X =PcX-CircleX;
double Y =PcY-CircleY;
double distance=sqrt(X*X + Y*Y);
if (distance>(CircleRadius*(2.0/3.0))) {
heading=atan2(PcY - CircleY, CircleX - PcX) * 180.0f / PI + 90.0f;
heading += 90.0f * (CircleRadius/distance);
heading *= 512.0f/360.0f;
if( heading >= 512.0f ) heading -= 512.0f;
if( heading < 0.0f ) heading += 512.0f;
}
dont know if someone could help or have some solutions, i presume that this circle routine heading was not design at all for what i need at all ... i really wish if someone could help on this finding problems and giving a solutions ... or could at least better explains the problems ... if you want to simulate problems fast use mq2moveutils, /circle on 25 and press down the back keys .... you will find what i means ..
s0rCieR