aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Entities/GameObject
diff options
context:
space:
mode:
authorSpp <spp@jorge.gr>2012-10-02 15:06:19 +0200
committerSpp <spp@jorge.gr>2012-10-02 15:06:19 +0200
commit7831ecdb182b62d84d0c3c31868a29263d13752e (patch)
tree98385154123a03aee4a26ff6b3498ecbe62390e3 /src/server/game/Entities/GameObject
parent380db44583df7abdafb2dfa18d89017dae88d39b (diff)
Core: "Initial support for C++11 compilers"
Diffstat (limited to 'src/server/game/Entities/GameObject')
-rwxr-xr-xsrc/server/game/Entities/GameObject/GameObject.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index c28ff21bfa5..c4d42f7a537 100755
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -1153,8 +1153,8 @@ void GameObject::Use(Unit* user)
// the distance between this slot and the center of the go - imagine a 1D space
float relativeDistance = (info->size*itr->first)-(info->size*(info->chair.slots-1)/2.0f);
- float x_i = GetPositionX() + relativeDistance * cos(orthogonalOrientation);
- float y_i = GetPositionY() + relativeDistance * sin(orthogonalOrientation);
+ float x_i = GetPositionX() + relativeDistance * std::cos(orthogonalOrientation);
+ float y_i = GetPositionY() + relativeDistance * std::sin(orthogonalOrientation);
if (itr->second)
{
@@ -1701,8 +1701,8 @@ bool GameObject::IsInRange(float x, float y, float z, float radius) const
if (!info)
return IsWithinDist3d(x, y, z, radius);
- float sinA = sin(GetOrientation());
- float cosA = cos(GetOrientation());
+ float sinA = std::sin(GetOrientation());
+ float cosA = std::cos(GetOrientation());
float dx = x - GetPositionX();
float dy = y - GetPositionY();
float dz = z - GetPositionZ();
@@ -1751,17 +1751,17 @@ void GameObject::UpdateRotationFields(float rotation2 /*=0.0f*/, float rotation3
{
static double const atan_pow = atan(pow(2.0f, -20.0f));
- double f_rot1 = sin(GetOrientation() / 2.0f);
- double f_rot2 = cos(GetOrientation() / 2.0f);
+ double f_rot1 = std::sin(GetOrientation() / 2.0f);
+ double f_rot2 = std::cos(GetOrientation() / 2.0f);
int64 i_rot1 = int64(f_rot1 / atan_pow *(f_rot2 >= 0 ? 1.0f : -1.0f));
int64 rotation = (i_rot1 << 43 >> 43) & 0x00000000001FFFFF;
- //float f_rot2 = sin(0.0f / 2.0f);
+ //float f_rot2 = std::sin(0.0f / 2.0f);
//int64 i_rot2 = f_rot2 / atan(pow(2.0f, -20.0f));
//rotation |= (((i_rot2 << 22) >> 32) >> 11) & 0x000003FFFFE00000;
- //float f_rot3 = sin(0.0f / 2.0f);
+ //float f_rot3 = std::sin(0.0f / 2.0f);
//int64 i_rot3 = f_rot3 / atan(pow(2.0f, -21.0f));
//rotation |= (i_rot3 >> 42) & 0x7FFFFC0000000000;