This reverts commit 179cb50557.
This commit is contained in:
parent
179cb50557
commit
c2ecc76457
588 changed files with 16260 additions and 10926 deletions
|
|
@ -19,19 +19,26 @@ namespace Server.Misc
|
|||
|
||||
public static Point2D ArcPoint(Point3D loc, int radius, int angle)
|
||||
{
|
||||
int sideA, sideB;
|
||||
|
||||
if (angle < 0)
|
||||
angle = 0;
|
||||
|
||||
if (angle > 90)
|
||||
angle = 90;
|
||||
|
||||
int sideA = (int)Math.Round(radius * Math.Sin(DegreesToRadians(angle)));
|
||||
int sideB = (int)Math.Round(radius * Math.Cos(DegreesToRadians(angle)));
|
||||
sideA = (int)Math.Round(radius * Math.Sin(DegreesToRadians(angle)));
|
||||
sideB = (int)Math.Round(radius * Math.Cos(DegreesToRadians(angle)));
|
||||
|
||||
return new Point2D(loc.X - sideB, loc.Y - sideA);
|
||||
}
|
||||
|
||||
public static void Circle2D(Point3D loc, Map map, int radius, DoEffect_Callback effect, int angleStart = 0, int angleEnd = 360)
|
||||
public static void Circle2D(Point3D loc, Map map, int radius, DoEffect_Callback effect)
|
||||
{
|
||||
Circle2D(loc, map, radius, effect, 0, 360);
|
||||
}
|
||||
|
||||
public static void Circle2D(Point3D loc, Map map, int radius, DoEffect_Callback effect, int angleStart, int angleEnd)
|
||||
{
|
||||
if (angleStart < 0 || angleStart > 360)
|
||||
angleStart = 0;
|
||||
|
|
@ -140,9 +147,13 @@ namespace Server.Misc
|
|||
withinBounds = false;
|
||||
}
|
||||
else if (pointQuadrant == start.Quadrant && (x < startX || y > startY))
|
||||
{
|
||||
withinBounds = false;
|
||||
}
|
||||
else if (pointQuadrant == end.Quadrant && (x > endX || y < endY))
|
||||
{
|
||||
withinBounds = false;
|
||||
}
|
||||
|
||||
return opposite ? !withinBounds : withinBounds;
|
||||
}
|
||||
|
|
@ -207,4 +218,4 @@ namespace Server.Misc
|
|||
public int Quadrant{ get; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue