diff options
author | Kahrl <kahrl@gmx.net> | 2012-02-01 02:37:01 +0100 |
---|---|---|
committer | Kahrl <kahrl@gmx.net> | 2012-02-01 02:37:01 +0100 |
commit | b85b4ede822b9d2d5f82c034e520341e9d86b08a (patch) | |
tree | c2785a5a482e707430bbc0b69a8c33bf0369aaf4 /src | |
parent | 2cb96d9d6800a3fd74bb6264974e8811ff8d4acd (diff) | |
download | minetest-b85b4ede822b9d2d5f82c034e520341e9d86b08a.tar.gz minetest-b85b4ede822b9d2d5f82c034e520341e9d86b08a.tar.bz2 minetest-b85b4ede822b9d2d5f82c034e520341e9d86b08a.zip |
Page up/down: don't display the old value, it was a little confusing
Diffstat (limited to 'src')
-rw-r--r-- | src/game.cpp | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/src/game.cpp b/src/game.cpp index f35b85cb6..a1f0fe07f 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1513,29 +1513,22 @@ void the_game( s16 range_new = range + 10; g_settings->set("viewing_range_nodes_min", itos(range_new)); statustext = narrow_to_wide( - "Minimum viewing range changed from " - + itos(range) + " to " + itos(range_new)); + "Minimum viewing range changed to " + + itos(range_new)); statustext_time = 0; } else if(input->wasKeyDown(getKeySetting("keymap_decrease_viewing_range_min"))) { s16 range = g_settings->getS16("viewing_range_nodes_min"); s16 range_new = range - 10; - if(range_new >= 0) - { - g_settings->set("viewing_range_nodes_min", - itos(range_new)); - statustext = narrow_to_wide( - "Minimum viewing range changed from " - + itos(range) + " to " - + itos(range_new)); - statustext_time = 0; - } - else - { - statustext = L"Minimum viewing range already at minimum"; - statustext_time = 0; - } + if(range_new < 0) + range_new = range; + g_settings->set("viewing_range_nodes_min", + itos(range_new)); + statustext = narrow_to_wide( + "Minimum viewing range changed to " + + itos(range_new)); + statustext_time = 0; } // Item selection with mouse wheel |