Core: "Initial support for C++11 compilers"
This commit is contained in:
1 parent
380db44583
commit
7831ecdb18
29 files changed
+394
-197
No files matched your search
@@ -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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user