mirror of
https://github.com/minetest/minetest.git
synced 2024-11-04 14:53:45 +01:00
Add mouse_sensitivity option
This commit is contained in:
parent
bda62bd3bf
commit
822723c246
@ -151,6 +151,8 @@
|
|||||||
#crosshair_color = (255,255,255)
|
#crosshair_color = (255,255,255)
|
||||||
# Cross alpha (opaqueness, between 0 and 255)
|
# Cross alpha (opaqueness, between 0 and 255)
|
||||||
#crosshair_alpha = 255
|
#crosshair_alpha = 255
|
||||||
|
# Sensitivity multiplier
|
||||||
|
#mouse_sensitivity = 0.2
|
||||||
# Sound settings
|
# Sound settings
|
||||||
#enable_sound = true
|
#enable_sound = true
|
||||||
#sound_volume = 0.7
|
#sound_volume = 0.7
|
||||||
|
@ -117,6 +117,7 @@ void set_default_settings(Settings *settings)
|
|||||||
settings->setDefault("selectionbox_color", "(0,0,0)");
|
settings->setDefault("selectionbox_color", "(0,0,0)");
|
||||||
settings->setDefault("crosshair_color", "(255,255,255)");
|
settings->setDefault("crosshair_color", "(255,255,255)");
|
||||||
settings->setDefault("crosshair_alpha", "255");
|
settings->setDefault("crosshair_alpha", "255");
|
||||||
|
settings->setDefault("mouse_sensitivity", "0.2");
|
||||||
settings->setDefault("enable_sound", "true");
|
settings->setDefault("enable_sound", "true");
|
||||||
settings->setDefault("sound_volume", "0.8");
|
settings->setDefault("sound_volume", "0.8");
|
||||||
settings->setDefault("desynchronize_mapblock_texture_animation", "true");
|
settings->setDefault("desynchronize_mapblock_texture_animation", "true");
|
||||||
|
@ -2061,7 +2061,8 @@ void the_game(
|
|||||||
if(input->isKeyDown(irr::KEY_RIGHT))
|
if(input->isKeyDown(irr::KEY_RIGHT))
|
||||||
dx += dtime * keyspeed;*/
|
dx += dtime * keyspeed;*/
|
||||||
|
|
||||||
float d = 0.2;
|
float d = g_settings->getFloat("mouse_sensitivity");
|
||||||
|
d = rangelim(d, 0.01, 100.0);
|
||||||
camera_yaw -= dx*d;
|
camera_yaw -= dx*d;
|
||||||
camera_pitch += dy*d;
|
camera_pitch += dy*d;
|
||||||
if(camera_pitch < -89.5) camera_pitch = -89.5;
|
if(camera_pitch < -89.5) camera_pitch = -89.5;
|
||||||
|
Loading…
Reference in New Issue
Block a user