diff --git a/src/game/client/components/hud.cpp b/src/game/client/components/hud.cpp index 3c5d8d296..3590766b2 100644 --- a/src/game/client/components/hud.cpp +++ b/src/game/client/components/hud.cpp @@ -1381,7 +1381,7 @@ void CHud::RenderMovementInformation(const int ClientID) { // On DDNet servers the more accurate angle is displayed, calculated from the target coordinates CNetObj_DDNetCharacter *pExtendedData = &m_pClient->m_Snap.m_aCharacters[ClientID].m_ExtendedData; - Angle = atan2f(pExtendedData->m_TargetY, pExtendedData->m_TargetX); + Angle = std::atan2(pExtendedData->m_TargetY, pExtendedData->m_TargetX); } else { diff --git a/src/game/gamecore.cpp b/src/game/gamecore.cpp index 57e8c7d6f..66d4bd645 100644 --- a/src/game/gamecore.cpp +++ b/src/game/gamecore.cpp @@ -160,7 +160,7 @@ void CCharacterCore::Tick(bool UseInput, bool DoDeferredTick) m_Direction = m_Input.m_Direction; // setup angle - float TmpAngle = atan2f(m_Input.m_TargetY, m_Input.m_TargetX); + float TmpAngle = std::atan2(m_Input.m_TargetY, m_Input.m_TargetX); if(TmpAngle < -(pi / 2.0f)) { m_Angle = (int)((TmpAngle + (2.0f * pi)) * 256.0f); diff --git a/src/game/server/entities/projectile.cpp b/src/game/server/entities/projectile.cpp index aa33b27c3..050212c25 100644 --- a/src/game/server/entities/projectile.cpp +++ b/src/game/server/entities/projectile.cpp @@ -233,7 +233,7 @@ void CProjectile::Tick() } else if(m_Type == WEAPON_GUN) { - GameServer()->CreateDamageInd(CurPos, -atan2(m_Direction.x, m_Direction.y), 10, (m_Owner != -1) ? TeamMask : CClientMask().set()); + GameServer()->CreateDamageInd(CurPos, -std::atan2(m_Direction.x, m_Direction.y), 10, (m_Owner != -1) ? TeamMask : CClientMask().set()); m_MarkedForDestroy = true; return; } @@ -380,7 +380,7 @@ bool CProjectile::FillExtraInfo(CNetObj_DDNetProjectile *pProj) return false; } //Send additional/modified info, by modifying the fields of the netobj - float Angle = -atan2f(m_Direction.x, m_Direction.y); + float Angle = -std::atan2(m_Direction.x, m_Direction.y); int Data = 0; Data |= (absolute(m_Owner) & 255) << 0;