aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel M. Weeks <dan@danweeks.net>2015-04-01 11:13:01 -0400
committerDaniel M. Weeks <dan@danweeks.net>2015-04-02 22:28:13 -0400
commit8476c2ac5a3cad03bc26b12fcc8b3f4f32854b65 (patch)
tree6906eaf7ab846da31203aa5793b54c86d38a4c8a /src
parentb948a4275e90c59db2599a1961937d62f17736ce (diff)
Switch abs to std::abs
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp2
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp
index 5e83c0c8653..8965b64767a 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp
@@ -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
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
index 57048340e1d..b3324980bd4 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
@@ -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);