*** empty log message ***
This commit is contained in:
@@ -130,7 +130,7 @@ namespace OpenArena
|
||||
currentRotX = -1.0f;
|
||||
else
|
||||
{
|
||||
Vec3f axis = (m_vView - m_vPosition).cross(m_vUpVector);
|
||||
Vec3f axis = (_heading).cross(_up);
|
||||
axis.normalize();
|
||||
|
||||
RotateView(angleZ, axis.x, axis.y, axis.z);
|
||||
|
||||
@@ -406,10 +406,10 @@ OpenArena::Vec2i OpenArena::Window::GetMousePosition()
|
||||
}
|
||||
#elif USE_AGL
|
||||
#elif USE_CGL
|
||||
#elif USE_WGL
|
||||
POINT pos;
|
||||
GetCursorPos(&pos);
|
||||
return Vec2i(pos.x, pos.y);
|
||||
#elif USE_WGL
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -30,8 +30,10 @@
|
||||
#ifdef WIN32
|
||||
//include necessary header files
|
||||
#include "main.h"
|
||||
#include <GL/glu.h>
|
||||
#include "version.h"
|
||||
#include "vector.h"
|
||||
using OpenArena::Vec2i;
|
||||
|
||||
//link necessary libraries
|
||||
#pragma comment(lib, "opengl32.lib")
|
||||
@@ -296,8 +298,8 @@ int WINAPI WinMain( HINSTANCE hInstance,
|
||||
//Vec2i mouseDelta = mousePosition - middleOfScreen;
|
||||
Vec2i mouseDelta = middleOfScreen - mousePosition;
|
||||
g_Screen.SetMousePosition(middleOfScreen);
|
||||
const float MOUSE_SENSITIVITY_HORIZONTAL = 0.005;
|
||||
const float MOUSE_SENSITIVITY_VERTICAL = 0.005;
|
||||
const float MOUSE_SENSITIVITY_HORIZONTAL = 0.005f;
|
||||
const float MOUSE_SENSITIVITY_VERTICAL = 0.005f;
|
||||
float horizontalAngle = mouseDelta.x * MOUSE_SENSITIVITY_HORIZONTAL;
|
||||
float verticalAngle = mouseDelta.y * MOUSE_SENSITIVITY_VERTICAL;
|
||||
level.defaultPlayer[0].camera.RotateHorizontal(horizontalAngle);
|
||||
|
||||
Reference in New Issue
Block a user