Skip to content

Commit 70c8ad4

Browse files
committed
More tweaks
1 parent ce654d2 commit 70c8ad4

File tree

1 file changed

+3
-13
lines changed
  • GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient

1 file changed

+3
-13
lines changed

GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cpp

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -119,18 +119,7 @@ inline Real maxf(Real a, Real b) { if (a > b) return a; else return b; }
119119
//-------------------------------------------------------------------------------------------------
120120
static void normAngle(Real &angle)
121121
{
122-
if (angle < -10*PI) {
123-
angle = 0;
124-
}
125-
if (angle > 10*PI) {
126-
angle = 0;
127-
}
128-
while (angle < -PI) {
129-
angle += 2*PI;
130-
}
131-
while (angle > PI) {
132-
angle -= 2*PI;
133-
}
122+
angle = WWMath::Normalize_Angle(angle);
134123
}
135124

136125
#define TERRAIN_SAMPLE_SIZE 40.0f
@@ -445,7 +434,8 @@ void W3DView::buildCameraTransform( Matrix3D *transform )
445434
// WST 10.22.2002. Update the Listener positions used by audio system
446435
//--------------------------------------------------------------------
447436
Vector3 position = transform->Get_Translation();
448-
Coord3D coord(position.X, position.Y, position.Z);
437+
Coord3D coord;
438+
coord.set(position.X, position.Y, position.Z);
449439
View::setPosition(&coord);
450440
break;
451441
}

0 commit comments

Comments
 (0)