mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-29 21:32:52 +01:00
@@ -126,7 +126,7 @@ public:
|
||||
if (dist(xn, yn, xh, yh) >= dist(xn, yn, xp, yp) || dist(xp, yp, xh, yh) >= dist(xn, yn, xp, yp))
|
||||
return false;
|
||||
// check distance from the beam
|
||||
return (abs((xn-xp)*yh+(yp-yn)*xh-xn*yp+xp*yn)/dist(xn, yn, xp, yp) < 1.5f);
|
||||
return (std::abs((xn-xp)*yh+(yp-yn)*xh-xn*yp+xp*yn)/dist(xn, yn, xp, yp) < 1.5f);
|
||||
}
|
||||
|
||||
float dist(float xa, float ya, float xb, float yb) // auxiliary method for distance
|
||||
|
||||
@@ -316,10 +316,10 @@ class boss_high_astromancer_solarian : public CreatureScript
|
||||
Portals[i][2] = PORTAL_Z;
|
||||
}
|
||||
}
|
||||
if ((abs(Portals[2][0] - Portals[1][0]) < 7) && (abs(Portals[2][1] - Portals[1][1]) < 7))
|
||||
if ((std::abs(Portals[2][0] - Portals[1][0]) < 7) && (std::abs(Portals[2][1] - Portals[1][1]) < 7))
|
||||
{
|
||||
int i=1;
|
||||
if (abs(CENTER_X + 26.0f - Portals[2][0]) < 7)
|
||||
if (std::abs(CENTER_X + 26.0f - Portals[2][0]) < 7)
|
||||
i = -1;
|
||||
Portals[2][0] = Portals[2][0]+7*i;
|
||||
Portals[2][1] = Portal_Y(Portals[2][0], LARGE_PORTAL_RADIUS);
|
||||
|
||||
Reference in New Issue
Block a user