Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-05-06 21:07:11 +0000
committerStijn Buys <ingar@osirion.org>2008-05-06 21:07:11 +0000
commit91d3a0352088611d3b78d3344b7a2bf2d4955a0a (patch)
tree74c0a6adf15ae15aa144f66f20272c1fd58a7db3 /src/client/input.cc
parent8fefc1d995083f0d4a9873f216ccc6e15688d0a9 (diff)
client-side frame interpolation: frames and timers
Diffstat (limited to 'src/client/input.cc')
-rw-r--r--src/client/input.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/input.cc b/src/client/input.cc
index 17ca724..fa23c1a 100644
--- a/src/client/input.cc
+++ b/src/client/input.cc
@@ -12,6 +12,7 @@
#include "client/camera.h"
#include "client/keyboard.h"
#include "client/video.h"
+#include "math/functions.h"
#include "render/text.h"
#include "SDL/SDL.h"
@@ -231,7 +232,7 @@ void frame(float seconds)
break;
case SDL_KEYDOWN:
if (event.key.keysym.sym == '`' || event.key.keysym.sym == '~') {
- last_control = 0;
+ //last_control = 0;
console::toggle();
if (console::visible() && chat::visible())
@@ -298,8 +299,9 @@ void frame(float seconds)
local_direction = mouse_direction;
local_pitch = mouse_pitch;
} else if (camera::mode == camera::Free) {
- camera::set_direction(-mouse_direction);
- camera::set_pitch(-mouse_pitch);
+ // squared values to smoothen camera movement
+ camera::set_direction( -mouse_direction * math::absf(mouse_direction));
+ camera::set_pitch(-mouse_pitch * math::absf(mouse_pitch));
}
} else {