rendered paste body private bool Blind(double mod)
{
FeelAhead = 2;
//TestPoint = new LavishScriptAPI.Point3f();
CharPoint = new PRPoint(PRCore.Character.Location);
double Distance;
if (mod == 0)
{
FeelAhead = FeelAhead + 2;
}
else
{
FeelAhead = 2;
}
FeelPoint = new PRPoint(1,1,PRCore.Character.Z);
double bearing;
bearing = PRCore.Character.Heading - mod;
bearing = DegreeOut(bearing);
double Rads = bearing * 180 / Math.PI;
InnerSpaceAPI.InnerSpace.Echo("Bearing:" + Convert.ToString(bearing));
//new_x = x * cos (angle) - y * sin (angle)
//new_y = x * sin (angle) + y * cos (angle)
FeelPoint.X = (PRCore.Character.X + Math.Sin(Rads) * FeelAhead);
FeelPoint.Y = (PRCore.Character.Y - Math.Cos(Rads) * FeelAhead);
InnerSpaceAPI.InnerSpace.Echo("CHAR location: "+Convert.ToString(CharPoint.X) +" "+ Convert.ToString(CharPoint.Y) +" "+ Convert.ToString(CharPoint.Z));
InnerSpaceAPI.InnerSpace.Echo("Heading : " + mod.ToString()+ " New Point:" + FeelPoint.ToString());
//TestPoint = PRCore.WoW.CollisionTest(CharPoint,FeelPoint);
//TestPoint = PRCore.WoW.IsPathObstructedOCD(CharPoint, FeelPoint);
PRPoint TestPoint = new PRPoint(PRCore.WoW.WoW.IsPathObstructed(CharPoint.X, CharPoint.Y, CharPoint.Z+1,FeelPoint.X, FeelPoint.Y, FeelPoint.Z+1,2));
Distance = TestPoint.Distance(PRCore.Character.Location);
if (Distance < FeelAhead )
{
return true;
}
return false;
// return PRCore.Character.IsPathObstructed(FeelPoint.X,FeelPoint.Y,FeelPoint.Z+10,FeelAhead);
// if (IPOCheck(PRCore.Character.Location, FeelPoint))
// return true;
// return false;
}