Browse Source

Fixed slow camera movements. Inverted y axis

Thomas Buck 11 years ago
parent
commit
38915c5a7d
3 changed files with 10 additions and 5 deletions
  1. 1
    0
      ChangeLog
  2. 8
    4
      src/OpenRaider.cpp
  3. 1
    1
      src/SDLSystem.cpp

+ 1
- 0
ChangeLog View File

6
  OpenRaider (0.1.2) xythobuz <xythobuz@xythobuz.de>
6
  OpenRaider (0.1.2) xythobuz <xythobuz@xythobuz.de>
7
 
7
 
8
 	[ 20140101 ]
8
 	[ 20140101 ]
9
+	* Fixed incredibly slow mouse/camera movements
9
 	* Fixed mouse grabbing in fullscreen mode. Also make mouse
10
 	* Fixed mouse grabbing in fullscreen mode. Also make mouse
10
 	  invisible and grab it in windowed mode
11
 	  invisible and grab it in windowed mode
11
 
12
 

+ 8
- 4
src/OpenRaider.cpp View File

362
 {
362
 {
363
 	if (x > 0)
363
 	if (x > 0)
364
 	{
364
 	{
365
-		m_camera.command(CAMERA_ROTATE_RIGHT);
365
+        while (x-- > 0) // Tried to fix very slow camera movements
366
+            m_camera.command(CAMERA_ROTATE_RIGHT);
366
 
367
 
367
 		if (LARA)
368
 		if (LARA)
368
 		{
369
 		{
382
 	}
383
 	}
383
 	else if (x < 0)
384
 	else if (x < 0)
384
 	{
385
 	{
385
-		m_camera.command(CAMERA_ROTATE_LEFT);
386
+        while (x++ < 0) // Tried to fix very slow camera movements
387
+            m_camera.command(CAMERA_ROTATE_LEFT);
386
 
388
 
387
 		if (LARA)
389
 		if (LARA)
388
 		{
390
 		{
402
 	}
404
 	}
403
 
405
 
404
 	if (y > 0)
406
 	if (y > 0)
405
-		m_camera.command(CAMERA_ROTATE_UP);
407
+        while (y-- > 0) // Tried to fix very slow camera movements
408
+            m_camera.command(CAMERA_ROTATE_UP);
406
 	else if (y < 0)
409
 	else if (y < 0)
407
-		m_camera.command(CAMERA_ROTATE_DOWN);
410
+        while (y++ < 0) // Tried to fix very slow camera movements
411
+            m_camera.command(CAMERA_ROTATE_DOWN);
408
 
412
 
409
 	if (LARA)
413
 	if (LARA)
410
 	{
414
 	{

+ 1
- 1
src/SDLSystem.cpp View File

340
 				break;
340
 				break;
341
 			case SDL_MOUSEMOTION:
341
 			case SDL_MOUSEMOTION:
342
 				// Wrap motion
342
 				// Wrap motion
343
-				handleMouseMotionEvent(event.motion.xrel*2, event.motion.yrel*2);
343
+				handleMouseMotionEvent(event.motion.xrel/2, -event.motion.yrel/2);
344
 				break;
344
 				break;
345
 			case SDL_MOUSEBUTTONDOWN:
345
 			case SDL_MOUSEBUTTONDOWN:
346
 			case SDL_MOUSEBUTTONUP:
346
 			case SDL_MOUSEBUTTONUP:

Loading…
Cancel
Save