diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-06-05 12:03:14 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-06-24 20:45:48 +0200 |
commit | 3aac4ea62aaa4b2c032ebc446bc0a729b9cc0572 (patch) | |
tree | 425b44a612b227d1fc1e788ee7b1d6783a171492 | |
parent | Fix IsSphereVisible calls (diff) | |
download | re3-3aac4ea62aaa4b2c032ebc446bc0a729b9cc0572.tar re3-3aac4ea62aaa4b2c032ebc446bc0a729b9cc0572.tar.gz re3-3aac4ea62aaa4b2c032ebc446bc0a729b9cc0572.tar.bz2 re3-3aac4ea62aaa4b2c032ebc446bc0a729b9cc0572.tar.lz re3-3aac4ea62aaa4b2c032ebc446bc0a729b9cc0572.tar.xz re3-3aac4ea62aaa4b2c032ebc446bc0a729b9cc0572.tar.zst re3-3aac4ea62aaa4b2c032ebc446bc0a729b9cc0572.zip |
Diffstat (limited to '')
-rw-r--r-- | src/control/CarCtrl.cpp | 4 | ||||
-rw-r--r-- | src/control/Script2.cpp | 4 | ||||
-rw-r--r-- | src/control/Script5.cpp | 8 | ||||
-rw-r--r-- | src/core/Cam.cpp | 18 |
4 files changed, 17 insertions, 17 deletions
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp index b11a23fb..44e7ae40 100644 --- a/src/control/CarCtrl.cpp +++ b/src/control/CarCtrl.cpp @@ -1603,8 +1603,8 @@ void CCarCtrl::WeaveForOtherCar(CEntity* pOtherEntity, CVehicle* pVehicle, float forward.Normalise(); float forwardAngle = GetATanOfXY(forward.x, forward.y); float angleDiff = angleBetweenVehicles - forwardAngle; - float lenProjection = ABS(pOtherCar->GetColModel()->boundingBox.max.y * sin(angleDiff)); - float widthProjection = ABS(pOtherCar->GetColModel()->boundingBox.max.x * cos(angleDiff)); + float lenProjection = ABS(pOtherCar->GetColModel()->boundingBox.max.y * Sin(angleDiff)); + float widthProjection = ABS(pOtherCar->GetColModel()->boundingBox.max.x * Cos(angleDiff)); float lengthToEvade = (2 * (lenProjection + widthProjection) + WIDTH_COEF_TO_WEAVE_SAFELY * 2 * pVehicle->GetColModel()->boundingBox.max.x) / distance; float diffToLeftAngle = LimitRadianAngle(angleBetweenVehicles - *pAngleToWeaveLeft); diffToLeftAngle = ABS(diffToLeftAngle); diff --git a/src/control/Script2.cpp b/src/control/Script2.cpp index e4c71403..6f6e89cc 100644 --- a/src/control/Script2.cpp +++ b/src/control/Script2.cpp @@ -467,8 +467,8 @@ int8 CRunningScript::ProcessCommands300To399(int32 command) float length = GET_FLOAT_PARAM(5); float x, y; if (angle != 0.0f){ - y = cos(angle) * length; - x = sin(angle) * length; + y = Cos(angle) * length; + x = Sin(angle) * length; }else{ y = length; x = 0.0f; diff --git a/src/control/Script5.cpp b/src/control/Script5.cpp index 8354492e..d9991388 100644 --- a/src/control/Script5.cpp +++ b/src/control/Script5.cpp @@ -1002,10 +1002,10 @@ void CRunningScript::PlayerInAngledAreaCheckCommand(int32 command, uint32* pIp) initAngle -= TWOPI; // it looks like the idea is to use a rectangle using the diagonal of the rectangle as // the side of new rectangle, with "length" being the length of second side - float rotatedSupX = supX + side2length * sin(initAngle); - float rotatedSupY = supY - side2length * cos(initAngle); - float rotatedInfX = infX + side2length * sin(initAngle); - float rotatedInfY = infY - side2length * cos(initAngle); + float rotatedSupX = supX + side2length * Sin(initAngle); + float rotatedSupY = supY - side2length * Cos(initAngle); + float rotatedInfX = infX + side2length * Sin(initAngle); + float rotatedInfY = infY - side2length * Cos(initAngle); float side1X = supX - infX; float side1Y = supY - infY; float side1Length = CVector2D(side1X, side1Y).Magnitude(); diff --git a/src/core/Cam.cpp b/src/core/Cam.cpp index 4895ef6e..c741081f 100644 --- a/src/core/Cam.cpp +++ b/src/core/Cam.cpp @@ -4956,9 +4956,9 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation, AlphaSpeed = 0.0; Distance = 1000.0; - Front.x = -(cos(Beta) * cos(Alpha)); - Front.y = -(sin(Beta) * cos(Alpha)); - Front.z = sin(Alpha); + Front.x = -(Cos(Beta) * Cos(Alpha)); + Front.y = -(Sin(Beta) * Cos(Alpha)); + Front.z = Sin(Alpha); m_aTargetHistoryPosOne = TargetCoors - nextDistance * Front; @@ -5232,9 +5232,9 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation, lastBeta = Beta; - Front.x = -(cos(Beta) * cos(Alpha)); - Front.y = -(sin(Beta) * cos(Alpha)); - Front.z = sin(Alpha); + Front.x = -(Cos(Beta) * Cos(Alpha)); + Front.y = -(Sin(Beta) * Cos(Alpha)); + Front.z = Sin(Alpha); GetVectorsReadyForRW(); TheCamera.m_bCamDirectlyBehind = false; TheCamera.m_bCamDirectlyInFront = false; @@ -5244,9 +5244,9 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation, m_cvecTargetCoorsForFudgeInter = TargetCoors; m_aTargetHistoryPosThree = m_aTargetHistoryPosOne; float nextAlpha = alphaWithSpeedAccounted + zoomModeAlphaOffset; - float nextFrontX = -(cos(Beta) * cos(nextAlpha)); - float nextFrontY = -(sin(Beta) * cos(nextAlpha)); - float nextFrontZ = sin(nextAlpha); + float nextFrontX = -(Cos(Beta) * Cos(nextAlpha)); + float nextFrontY = -(Sin(Beta) * Cos(nextAlpha)); + float nextFrontZ = Sin(nextAlpha); m_aTargetHistoryPosOne.x = TargetCoors.x - nextFrontX * nextDistance; m_aTargetHistoryPosOne.y = TargetCoors.y - nextFrontY * nextDistance; |