*** empty log message ***

This commit is contained in:
2006-08-11 16:57:22 -04:00
parent 88ccc51769
commit 691cfb0c70
3 changed files with 6 additions and 4 deletions

View File

@@ -130,7 +130,7 @@ namespace OpenArena
currentRotX = -1.0f; currentRotX = -1.0f;
else else
{ {
Vec3f axis = (m_vView - m_vPosition).cross(m_vUpVector); Vec3f axis = (_heading).cross(_up);
axis.normalize(); axis.normalize();
RotateView(angleZ, axis.x, axis.y, axis.z); RotateView(angleZ, axis.x, axis.y, axis.z);

View File

@@ -406,10 +406,10 @@ OpenArena::Vec2i OpenArena::Window::GetMousePosition()
} }
#elif USE_AGL #elif USE_AGL
#elif USE_CGL #elif USE_CGL
#elif USE_WGL
POINT pos; POINT pos;
GetCursorPos(&pos); GetCursorPos(&pos);
return Vec2i(pos.x, pos.y); return Vec2i(pos.x, pos.y);
#elif USE_WGL
#endif #endif
} }

View File

@@ -30,8 +30,10 @@
#ifdef WIN32 #ifdef WIN32
//include necessary header files //include necessary header files
#include "main.h" #include "main.h"
#include <GL/glu.h>
#include "version.h" #include "version.h"
#include "vector.h" #include "vector.h"
using OpenArena::Vec2i;
//link necessary libraries //link necessary libraries
#pragma comment(lib, "opengl32.lib") #pragma comment(lib, "opengl32.lib")
@@ -296,8 +298,8 @@ int WINAPI WinMain( HINSTANCE hInstance,
//Vec2i mouseDelta = mousePosition - middleOfScreen; //Vec2i mouseDelta = mousePosition - middleOfScreen;
Vec2i mouseDelta = middleOfScreen - mousePosition; Vec2i mouseDelta = middleOfScreen - mousePosition;
g_Screen.SetMousePosition(middleOfScreen); g_Screen.SetMousePosition(middleOfScreen);
const float MOUSE_SENSITIVITY_HORIZONTAL = 0.005; const float MOUSE_SENSITIVITY_HORIZONTAL = 0.005f;
const float MOUSE_SENSITIVITY_VERTICAL = 0.005; const float MOUSE_SENSITIVITY_VERTICAL = 0.005f;
float horizontalAngle = mouseDelta.x * MOUSE_SENSITIVITY_HORIZONTAL; float horizontalAngle = mouseDelta.x * MOUSE_SENSITIVITY_HORIZONTAL;
float verticalAngle = mouseDelta.y * MOUSE_SENSITIVITY_VERTICAL; float verticalAngle = mouseDelta.y * MOUSE_SENSITIVITY_VERTICAL;
level.defaultPlayer[0].camera.RotateHorizontal(horizontalAngle); level.defaultPlayer[0].camera.RotateHorizontal(horizontalAngle);