Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/input.cc')
-rw-r--r--src/client/input.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client/input.cc b/src/client/input.cc
index d8639cc..45c39a9 100644
--- a/src/client/input.cc
+++ b/src/client/input.cc
@@ -38,8 +38,8 @@ unsigned int last_control = 0;
int mouse_x = 0;
int mouse_y = 0;
-float mouse_pitch;
-float mouse_direction;
+float mouse_pitch = 0;
+float mouse_direction = 0;
// true if the mouse is in the deadzone
bool mouse_deadzone = false;
@@ -204,6 +204,10 @@ void frame(float seconds)
local_roll = 0.0f;
local_thrust = core::localcontrol()->thrust();
last_control = core::localcontrol()->id();
+ mouse_pitch = 0.0f;
+ mouse_direction = 0.0f;
+ mouse_x = video::width / 2;
+ mouse_y = video::height / 2;
camera::reset();
}