static float user_eye_height = 165;
static float walk_speed = 300.0f;
+static float mouse_speed = 1.0f;
static bool show_walk_mesh, noclip = false;
static bool have_headtracking, should_swap;
walk_speed *= 0.75;
show_message("walk speed: %g", walk_speed);
break;
+
+ case ']':
+ mouse_speed *= 1.2;
+ show_message("mouse speed: %g", mouse_speed);
+ break;
+
+ case '[':
+ mouse_speed *= 0.8;
+ show_message("mouse speed: %g", mouse_speed);
+ break;
}
}
void app_mouse_delta(int dx, int dy)
{
if(bnstate[2]) {
- mouse_zoom(dx, dy);
+ mouse_zoom(dx * mouse_speed, dy * mouse_speed);
} else {
- mouse_look(dx, dy);
+ mouse_look(dx * mouse_speed, dy * mouse_speed);
}
}
case SDL_MOUSEMOTION:
if(mouse_grabbed) {
// XXX xrel/yrel seems faster by default
- app_mouse_delta(ev->motion.xrel * 0.5, ev->motion.yrel * 0.5);
+ app_mouse_delta(ev->motion.xrel * 0.75, ev->motion.yrel * 0.75);
} else {
app_mouse_motion(ev->motion.x * scale_factor, ev->motion.y * scale_factor);
}