aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSokomine <wegwerf@anarres.dyndns.org>2014-11-22 21:40:23 +0100
committerCraig Robbins <kde.psych@gmail.com>2014-11-27 01:07:11 +1000
commit9f9279008c9299f6f1accd0a3b230877caa87930 (patch)
tree9baeb2cfbe8cdc791329cf4ac5ef3b99e392890b /src
parentec5188a49a2ae5d69b8ab0df51ba1086b51e7891 (diff)
downloadminetest-9f9279008c9299f6f1accd0a3b230877caa87930.tar.gz
minetest-9f9279008c9299f6f1accd0a3b230877caa87930.tar.bz2
minetest-9f9279008c9299f6f1accd0a3b230877caa87930.zip
added enable_build_where_you_stand option
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/defaultsettings.cpp1
-rw-r--r--src/game.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp
index 135fa8762..72eac76c2 100644
--- a/src/defaultsettings.cpp
+++ b/src/defaultsettings.cpp
@@ -63,6 +63,7 @@ void set_default_settings(Settings *settings)
settings->setDefault("keymap_camera_mode", "KEY_F7");
settings->setDefault("keymap_increase_viewing_range_min", "+");
settings->setDefault("keymap_decrease_viewing_range_min", "-");
+ settings->setDefault("enable_build_where_you_stand", "false" );
settings->setDefault("3d_mode", "none");
settings->setDefault("3d_paralax_strength", "0.025");
settings->setDefault("aux1_descends", "false");
diff --git a/src/game.cpp b/src/game.cpp
index 70d526a9d..4af483bd7 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -967,6 +967,7 @@ bool nodePlacementPrediction(Client &client,
// Dont place node when player would be inside new node
// NOTE: This is to be eventually implemented by a mod as client-side Lua
if (!nodedef->get(n).walkable ||
+ g_settings->getBool("enable_build_where_you_stand") ||
(client.checkPrivilege("noclip") && g_settings->getBool("noclip")) ||
(nodedef->get(n).walkable &&
neighbourpos != player->getStandingNodePos() + v3s16(0, 1, 0) &&