mirror of
https://github.com/minetest/minetest.git
synced 2024-11-04 14:53:45 +01:00
invert_mouse config option
--HG-- extra : rebase_source : 2695ad71185244cefbcf6e3e28ba1ab5e54c882f
This commit is contained in:
parent
63611932eb
commit
9f7c21a0b4
@ -14,6 +14,7 @@ X:
|
|||||||
- Player passwords
|
- Player passwords
|
||||||
- All textures first searched from texture_path
|
- All textures first searched from texture_path
|
||||||
- Map directory ("map") has been renamed to "world" (just rename it to load an old world)
|
- Map directory ("map") has been renamed to "world" (just rename it to load an old world)
|
||||||
|
- Mouse inversion (invert_mouse)
|
||||||
|
|
||||||
2011-04-24:
|
2011-04-24:
|
||||||
- Smooth lighting with simple ambient occlusion
|
- Smooth lighting with simple ambient occlusion
|
||||||
|
@ -42,6 +42,8 @@
|
|||||||
#keymap_special1 = KEY_KEY_E
|
#keymap_special1 = KEY_KEY_E
|
||||||
#keymap_print_debug_stacks = KEY_KEY_P
|
#keymap_print_debug_stacks = KEY_KEY_P
|
||||||
|
|
||||||
|
#invert_mouse = false
|
||||||
|
|
||||||
# The desired FPS
|
# The desired FPS
|
||||||
#wanted_fps = 30
|
#wanted_fps = 30
|
||||||
|
|
||||||
|
@ -65,6 +65,7 @@ void set_default_settings()
|
|||||||
g_settings.setDefault("free_move", "false");
|
g_settings.setDefault("free_move", "false");
|
||||||
g_settings.setDefault("continuous_forward", "false");
|
g_settings.setDefault("continuous_forward", "false");
|
||||||
g_settings.setDefault("fast_move", "false");
|
g_settings.setDefault("fast_move", "false");
|
||||||
|
g_settings.setDefault("invert_mouse", "false");
|
||||||
|
|
||||||
// Server stuff
|
// Server stuff
|
||||||
g_settings.setDefault("enable_experimental", "false");
|
g_settings.setDefault("enable_experimental", "false");
|
||||||
|
@ -895,6 +895,8 @@ void the_game(
|
|||||||
|
|
||||||
float damage_flash_timer = 0;
|
float damage_flash_timer = 0;
|
||||||
|
|
||||||
|
bool invert_mouse = g_settings.getBool("invert_mouse");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Main loop
|
Main loop
|
||||||
*/
|
*/
|
||||||
@ -1306,6 +1308,8 @@ void the_game(
|
|||||||
else{
|
else{
|
||||||
s32 dx = input->getMousePos().X - displaycenter.X;
|
s32 dx = input->getMousePos().X - displaycenter.X;
|
||||||
s32 dy = input->getMousePos().Y - displaycenter.Y;
|
s32 dy = input->getMousePos().Y - displaycenter.Y;
|
||||||
|
if(invert_mouse)
|
||||||
|
dy = -dy;
|
||||||
//std::cout<<"window active, pos difference "<<dx<<","<<dy<<std::endl;
|
//std::cout<<"window active, pos difference "<<dx<<","<<dy<<std::endl;
|
||||||
|
|
||||||
/*const float keyspeed = 500;
|
/*const float keyspeed = 500;
|
||||||
|
Loading…
Reference in New Issue
Block a user