From 01a784bd11d833724fdf826d805429d3a6f7b1f5 Mon Sep 17 00:00:00 2001 From: paramat Date: Thu, 12 May 2016 04:39:05 +0100 Subject: Documentation: Remove incorrect and excessive mapgen flags text --- minetest.conf.example | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'minetest.conf.example') diff --git a/minetest.conf.example b/minetest.conf.example index 5090a620b..a5ca16e51 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -1046,8 +1046,6 @@ # Global map generation attributes. # In Mapgen v6 the 'decorations' flag controls all decorations except trees # and junglegrass, in all other mapgens this flag controls all decorations. -# The default flags set in the engine are: caves, light, decorations -# The flags string modifies the engine defaults. # Flags that are not specified in the flag string are not modified from the default. # Flags starting with 'no' are used to explicitly disable them. # type: flags possible values: caves, dungeons, light, decorations, nocaves, nodungeons, nolight, nodecorations @@ -1121,8 +1119,6 @@ # Map generation attributes specific to Mapgen v6. # When snowbiomes are enabled jungles are automatically enabled, the 'jungles' flag is ignored. -# The default flags set in the engine are: biomeblend, mudflow -# The flags string modifies the engine defaults. # Flags that are not specified in the flag string are not modified from the default. # Flags starting with 'no' are used to explicitly disable them. # type: flags possible values: jungles, biomeblend, mudflow, snowbiomes, flat, trees, nojungles, nobiomeblend, nomudflow, nosnowbiomes, noflat, notrees @@ -1173,8 +1169,6 @@ # Map generation attributes specific to Mapgen v7. # The 'ridges' flag controls the rivers. -# The default flags set in the engine are: mountains, ridges -# The flags string modifies the engine defaults. # Flags that are not specified in the flag string are not modified from the default. # Flags starting with 'no' are used to explicitly disable them. # type: flags possible values: mountains, ridges, nomountains, noridges @@ -1221,8 +1215,6 @@ # Map generation attributes specific to Mapgen flat. # Occasional lakes and hills can be added to the flat world. -# The default flags set in the engine are: none -# The flags string modifies the engine defaults. # Flags that are not specified in the flag string are not modified from the default. # Flags starting with 'no' are used to explicitly disable them. # type: flags possible values: lakes, hills, , nolakes, nohills @@ -1367,8 +1359,6 @@ # 'altitude_chill' makes higher elevations colder, which may cause biome issues. # 'humid_rivers' modifies the humidity around rivers and in areas where water would tend to pool, # it may interfere with delicately adjusted biomes. -# The default flags set in the engine are: altitude_chill, humid_rivers -# The flags string modifies the engine defaults. # Flags that are not specified in the flag string are not modified from the default. # Flags starting with 'no' are used to explicitly disable them. # type: flags possible values: altitude_chill, noaltitude_chill, humid_rivers, nohumid_rivers -- cgit v1.2.3 From 9997e2030c86b938d1889ee71522bc26d01226e6 Mon Sep 17 00:00:00 2001 From: paramat Date: Tue, 21 Jun 2016 03:48:24 +0100 Subject: Mgflat/fractal/v7/valleys: Denser 3D noise tunnels Reduce spread from 96 to primes 61 and 67 (either side of 64) Prime spreads help to keep 3D noise periodic features unaligned 'cave width' 0.2 to preserve tunnel width Reduce octaves to 3 to improve network structure --- builtin/settingtypes.txt | 24 ++++++++++++------------ minetest.conf.example | 24 ++++++++++++------------ src/mapgen_flat.cpp | 6 +++--- src/mapgen_fractal.cpp | 6 +++--- src/mapgen_v7.cpp | 6 +++--- src/mapgen_valleys.cpp | 6 +++--- 6 files changed, 36 insertions(+), 36 deletions(-) (limited to 'minetest.conf.example') diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index b53e35a85..c751f34f2 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -954,7 +954,7 @@ mgv6_np_apple_trees (Mapgen v6 apple trees noise parameters) noise_params 0, 1, mgv7_spflags (Mapgen v7 flags) flags mountains,ridges mountains,ridges,nomountains,noridges # Controls width of tunnels, a smaller value creates wider tunnels. -mgv7_cave_width (Mapgen v7 cave width) float 0.3 +mgv7_cave_width (Mapgen v7 cave width) float 0.2 mgv7_np_terrain_base (Mapgen v7 terrain base noise parameters) noise_params 4, 70, (600, 600, 600), 82341, 5, 0.6, 2.0 mgv7_np_terrain_alt (Mapgen v7 terrain altitude noise parameters) noise_params 4, 25, (600, 600, 600), 5934, 5, 0.6, 2.0 @@ -965,8 +965,8 @@ mgv7_np_mount_height (Mapgen v7 mount height noise parameters) noise_params 256, mgv7_np_ridge_uwater (Mapgen v7 ridge water noise parameters) noise_params 0, 1, (1000, 1000, 1000), 85039, 5, 0.6, 2.0 mgv7_np_mountain (Mapgen v7 mountain noise parameters) noise_params -0.6, 1, (250, 350, 250), 5333, 5, 0.63, 2.0 mgv7_np_ridge (Mapgen v7 ridge noise parameters) noise_params 0, 1, (100, 100, 100), 6467, 4, 0.75, 2.0 -mgv7_np_cave1 (Mapgen v7 cave1 noise parameters) noise_params 0, 12, (100, 100, 100), 52534, 4, 0.5, 2.0 -mgv7_np_cave2 (Mapgen v7 cave2 noise parameters) noise_params 0, 12, (100, 100, 100), 10325, 4, 0.5, 2.0 +mgv7_np_cave1 (Mapgen v7 cave1 noise parameters) noise_params 0, 12, (61, 61, 61), 52534, 3, 0.5, 2.0 +mgv7_np_cave2 (Mapgen v7 cave2 noise parameters) noise_params 0, 12, (67, 67, 67), 10325, 3, 0.5, 2.0 [***Mapgen flat] @@ -983,7 +983,7 @@ mgflat_ground_level (Mapgen flat ground level) int 8 mgflat_large_cave_depth (Mapgen flat large cave depth) int -33 # Controls width of tunnels, a smaller value creates wider tunnels. -mgflat_cave_width (Mapgen flat cave width) float 0.3 +mgflat_cave_width (Mapgen flat cave width) float 0.2 # Terrain noise threshold for lakes. # Controls proportion of world area covered by lakes. @@ -1007,13 +1007,13 @@ mgflat_hill_steepness (Mapgen flat hill steepness) float 64.0 mgflat_np_terrain (Mapgen flat terrain noise parameters) noise_params 0, 1, (600, 600, 600), 7244, 5, 0.6, 2.0 mgflat_np_filler_depth (Mapgen flat filler depth noise parameters) noise_params 0, 1.2, (150, 150, 150), 261, 3, 0.7, 2.0 -mgflat_np_cave1 (Mapgen flat cave1 noise parameters) noise_params 0, 12, (128, 128, 128), 52534, 4, 0.5, 2.0 -mgflat_np_cave2 (Mapgen flat cave2 noise parameters) noise_params 0, 12, (128, 128, 128), 10325, 4, 0.5, 2.0 +mgflat_np_cave1 (Mapgen flat cave1 noise parameters) noise_params 0, 12, (61, 61, 61), 52534, 3, 0.5, 2.0 +mgflat_np_cave2 (Mapgen flat cave2 noise parameters) noise_params 0, 12, (67, 67, 67), 10325, 3, 0.5, 2.0 [***Mapgen fractal] # Controls width of tunnels, a smaller value creates wider tunnels. -mgfractal_cave_width (Mapgen fractal cave width) float 0.3 +mgfractal_cave_width (Mapgen fractal cave width) float 0.2 # Choice of 18 fractals from 9 formulas. # 1 = 4D "Roundy" mandelbrot set. @@ -1074,8 +1074,8 @@ mgfractal_julia_w (Mapgen fractal julia w) float 0.33 mgfractal_np_seabed (Mapgen fractal seabed noise parameters) noise_params -14, 9, (600, 600, 600), 41900, 5, 0.6, 2.0 mgfractal_np_filler_depth (Mapgen fractal filler depth noise parameters) noise_params 0, 1.2, (150, 150, 150), 261, 3, 0.7, 2.0 -mgfractal_np_cave1 (Mapgen fractal cave1 noise parameters) noise_params 0, 12, (128, 128, 128), 52534, 4, 0.5, 2.0 -mgfractal_np_cave2 (Mapgen fractal cave2 noise parameters) noise_params 0, 12, (128, 128, 128), 10325, 4, 0.5, 2.0 +mgfractal_np_cave1 (Mapgen fractal cave1 noise parameters) noise_params 0, 12, (61, 61, 61), 52534, 3, 0.5, 2.0 +mgfractal_np_cave2 (Mapgen fractal cave2 noise parameters) noise_params 0, 12, (67, 67, 67), 10325, 3, 0.5, 2.0 # Mapgen Valleys parameters [***Mapgen Valleys] @@ -1115,16 +1115,16 @@ mgvalleys_river_size (River Size) int 5 mgvalleys_water_features (Water Features) int 0 # Controls width of tunnels, a smaller value creates wider tunnels. -mgvalleys_cave_width (Cave width) float 0.3 +mgvalleys_cave_width (Cave width) float 0.2 # Noise parameters [****Noises] # Caves and tunnels form at the intersection of the two noises -mgvalleys_np_cave1 (Cave noise #1) noise_params 0, 12, (100, 100, 100), 52534, 4, 0.5, 2.0 +mgvalleys_np_cave1 (Cave noise #1) noise_params 0, 12, (61, 61, 61), 52534, 3, 0.5, 2.0 # Caves and tunnels form at the intersection of the two noises -mgvalleys_np_cave2 (Cave noise #2) noise_params 0, 12, (100, 100, 100), 10325, 4, 0.5, 2.0 +mgvalleys_np_cave2 (Cave noise #2) noise_params 0, 12, (67, 67, 67), 10325, 3, 0.5, 2.0 # The depth of dirt or other filler mgvalleys_np_filler_depth (Filler Depth) noise_params 0, 1.2, (256, 256, 256), 1605, 3, 0.5, 2.0 diff --git a/minetest.conf.example b/minetest.conf.example index a5ca16e51..35675dfe3 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -1176,7 +1176,7 @@ # Controls width of tunnels, a smaller value creates wider tunnels. # type: float -# mgv7_cave_width = 0.3 +# mgv7_cave_width = 0.2 # type: noise_params # mgv7_np_terrain_base = 4, 70, (600, 600, 600), 82341, 5, 0.6, 2.0 @@ -1206,10 +1206,10 @@ # mgv7_np_ridge = 0, 1, (100, 100, 100), 6467, 4, 0.75, 2.0 # type: noise_params -# mgv7_np_cave1 = 0, 12, (100, 100, 100), 52534, 4, 0.5, 2.0 +# mgv7_np_cave1 = 0, 12, (61, 61, 61), 52534, 3, 0.5, 2.0 # type: noise_params -# mgv7_np_cave2 = 0, 12, (100, 100, 100), 10325, 4, 0.5, 2.0 +# mgv7_np_cave2 = 0, 12, (67, 67, 67), 10325, 3, 0.5, 2.0 #### Mapgen flat @@ -1230,7 +1230,7 @@ # Controls width of tunnels, a smaller value creates wider tunnels. # type: float -# mgflat_cave_width = 0.3 +# mgflat_cave_width = 0.2 # Terrain noise threshold for lakes. # Controls proportion of world area covered by lakes. @@ -1262,16 +1262,16 @@ # mgflat_np_filler_depth = 0, 1.2, (150, 150, 150), 261, 3, 0.7, 2.0 # type: noise_params -# mgflat_np_cave1 = 0, 12, (128, 128, 128), 52534, 4, 0.5, 2.0 +# mgflat_np_cave1 = 0, 12, (61, 61, 61), 52534, 3, 0.5, 2.0 # type: noise_params -# mgflat_np_cave2 = 0, 12, (128, 128, 128), 10325, 4, 0.5, 2.0 +# mgflat_np_cave2 = 0, 12, (67, 67, 67), 10325, 3, 0.5, 2.0 #### Mapgen fractal # Controls width of tunnels, a smaller value creates wider tunnels. # type: float -# mgfractal_cave_width = 0.3 +# mgfractal_cave_width = 0.2 # Choice of 18 fractals from 9 formulas. # 1 = 4D "Roundy" mandelbrot set. @@ -1346,10 +1346,10 @@ # mgfractal_np_filler_depth = 0, 1.2, (150, 150, 150), 261, 3, 0.7, 2.0 # type: noise_params -# mgfractal_np_cave1 = 0, 12, (128, 128, 128), 52534, 4, 0.5, 2.0 +# mgfractal_np_cave1 = 0, 12, (61, 61, 61), 52534, 3, 0.5, 2.0 # type: noise_params -# mgfractal_np_cave2 = 0, 12, (128, 128, 128), 10325, 4, 0.5, 2.0 +# mgfractal_np_cave2 = 0, 12, (67, 67, 67), 10325, 3, 0.5, 2.0 #### Mapgen Valleys @@ -1396,17 +1396,17 @@ # Controls width of tunnels, a smaller value creates wider tunnels. # type: float -# mgvalleys_cave_width = 0.3 +# mgvalleys_cave_width = 0.2 ##### Noises # Caves and tunnels form at the intersection of the two noises # type: noise_params -# mgvalleys_np_cave1 = 0, 12, (100, 100, 100), 52534, 4, 0.5, 2.0 +# mgvalleys_np_cave1 = 0, 12, (61, 61, 61), 52534, 3, 0.5, 2.0 # Caves and tunnels form at the intersection of the two noises # type: noise_params -# mgvalleys_np_cave2 = 0, 12, (100, 100, 100), 10325, 4, 0.5, 2.0 +# mgvalleys_np_cave2 = 0, 12, (67, 67, 67), 10325, 3, 0.5, 2.0 # The depth of dirt or other filler # type: noise_params diff --git a/src/mapgen_flat.cpp b/src/mapgen_flat.cpp index 7cc6aad5c..956af999a 100644 --- a/src/mapgen_flat.cpp +++ b/src/mapgen_flat.cpp @@ -84,7 +84,7 @@ MapgenFlatParams::MapgenFlatParams() spflags = 0; ground_level = 8; large_cave_depth = -33; - cave_width = 0.3; + cave_width = 0.2; lake_threshold = -0.45; lake_steepness = 48.0; hill_threshold = 0.45; @@ -92,8 +92,8 @@ MapgenFlatParams::MapgenFlatParams() np_terrain = NoiseParams(0, 1, v3f(600, 600, 600), 7244, 5, 0.6, 2.0); np_filler_depth = NoiseParams(0, 1.2, v3f(150, 150, 150), 261, 3, 0.7, 2.0); - np_cave1 = NoiseParams(0, 12, v3f(96, 96, 96), 52534, 4, 0.5, 2.0); - np_cave2 = NoiseParams(0, 12, v3f(96, 96, 96), 10325, 4, 0.5, 2.0); + np_cave1 = NoiseParams(0, 12, v3f(61, 61, 61), 52534, 3, 0.5, 2.0); + np_cave2 = NoiseParams(0, 12, v3f(67, 67, 67), 10325, 3, 0.5, 2.0); } diff --git a/src/mapgen_fractal.cpp b/src/mapgen_fractal.cpp index c47a7bfdc..9e4c210dc 100644 --- a/src/mapgen_fractal.cpp +++ b/src/mapgen_fractal.cpp @@ -86,7 +86,7 @@ MapgenFractal::~MapgenFractal() MapgenFractalParams::MapgenFractalParams() { spflags = 0; - cave_width = 0.3; + cave_width = 0.2; fractal = 1; iterations = 11; scale = v3f(4096.0, 1024.0, 4096.0); @@ -99,8 +99,8 @@ MapgenFractalParams::MapgenFractalParams() np_seabed = NoiseParams(-14, 9, v3f(600, 600, 600), 41900, 5, 0.6, 2.0); np_filler_depth = NoiseParams(0, 1.2, v3f(150, 150, 150), 261, 3, 0.7, 2.0); - np_cave1 = NoiseParams(0, 12, v3f(96, 96, 96), 52534, 4, 0.5, 2.0); - np_cave2 = NoiseParams(0, 12, v3f(96, 96, 96), 10325, 4, 0.5, 2.0); + np_cave1 = NoiseParams(0, 12, v3f(61, 61, 61), 52534, 3, 0.5, 2.0); + np_cave2 = NoiseParams(0, 12, v3f(67, 67, 67), 10325, 3, 0.5, 2.0); } diff --git a/src/mapgen_v7.cpp b/src/mapgen_v7.cpp index 35dcdcd94..c24b3e8d1 100644 --- a/src/mapgen_v7.cpp +++ b/src/mapgen_v7.cpp @@ -94,7 +94,7 @@ MapgenV7::~MapgenV7() MapgenV7Params::MapgenV7Params() { spflags = MGV7_MOUNTAINS | MGV7_RIDGES; - cave_width = 0.3; + cave_width = 0.2; np_terrain_base = NoiseParams(4, 70, v3f(600, 600, 600), 82341, 5, 0.6, 2.0); np_terrain_alt = NoiseParams(4, 25, v3f(600, 600, 600), 5934, 5, 0.6, 2.0); @@ -105,8 +105,8 @@ MapgenV7Params::MapgenV7Params() np_ridge_uwater = NoiseParams(0, 1, v3f(1000, 1000, 1000), 85039, 5, 0.6, 2.0); np_mountain = NoiseParams(-0.6, 1, v3f(250, 350, 250), 5333, 5, 0.63, 2.0); np_ridge = NoiseParams(0, 1, v3f(100, 100, 100), 6467, 4, 0.75, 2.0); - np_cave1 = NoiseParams(0, 12, v3f(96, 96, 96), 52534, 4, 0.5, 2.0); - np_cave2 = NoiseParams(0, 12, v3f(96, 96, 96), 10325, 4, 0.5, 2.0); + np_cave1 = NoiseParams(0, 12, v3f(61, 61, 61), 52534, 3, 0.5, 2.0); + np_cave2 = NoiseParams(0, 12, v3f(67, 67, 67), 10325, 3, 0.5, 2.0); } diff --git a/src/mapgen_valleys.cpp b/src/mapgen_valleys.cpp index bbf20719d..02a8fbfe0 100644 --- a/src/mapgen_valleys.cpp +++ b/src/mapgen_valleys.cpp @@ -144,10 +144,10 @@ MapgenValleysParams::MapgenValleysParams() river_depth = 4; // How deep to carve river channels. river_size = 5; // How wide to make rivers. water_features = 0; // How often water will occur in caves. - cave_width = 0.3; + cave_width = 0.2; - np_cave1 = NoiseParams(0, 12, v3f(96, 96, 96), 52534, 4, 0.5, 2.0); - np_cave2 = NoiseParams(0, 12, v3f(96, 96, 96), 10325, 4, 0.5, 2.0); + np_cave1 = NoiseParams(0, 12, v3f(61, 61, 61), 52534, 3, 0.5, 2.0); + np_cave2 = NoiseParams(0, 12, v3f(67, 67, 67), 10325, 3, 0.5, 2.0); np_filler_depth = NoiseParams(0.f, 1.2f, v3f(256, 256, 256), 1605, 3, 0.5f, 2.f); np_inter_valley_fill = NoiseParams(0.f, 1.f, v3f(256, 512, 256), 1993, 6, 0.8f, 2.f); np_inter_valley_slope = NoiseParams(0.5f, 0.5f, v3f(128, 128, 128), 746, 1, 1.f, 2.f); -- cgit v1.2.3 From 538af97d8d0d0a3c50a7092c029d8585079144c4 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Mon, 4 Jul 2016 18:01:58 +0100 Subject: Remove cinematic toggle on F8 Also update cinematic mode's description to include mouse --- builtin/settingtypes.txt | 4 ++-- minetest.conf.example | 5 ++--- src/defaultsettings.cpp | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) (limited to 'minetest.conf.example') diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index 3f256ec43..0b9d29a33 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -70,7 +70,7 @@ fast_move (Fast movement) bool false # This requires the "noclip" privilege on the server. noclip (Noclip) bool false -# Smooths camera when moving and looking around. +# Smooths camera when looking around. Also called look or mouse smoothing. # Useful for recording videos. cinematic (Cinematic mode) bool false @@ -178,7 +178,7 @@ keymap_noclip (Noclip key) key KEY_KEY_H # Key for toggling cinematic mode. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 -keymap_cinematic (Cinematic mode key) key KEY_F8 +keymap_cinematic (Cinematic mode key) key # Key for toggling display of minimap. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 diff --git a/minetest.conf.example b/minetest.conf.example index 35675dfe3..bc0d4c527 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -38,7 +38,7 @@ # type: bool # noclip = false -# Smooths camera when moving and looking around. +# Smooths camera when looking around. Also called look or mouse smoothing. # Useful for recording videos. # type: bool # cinematic = false @@ -162,7 +162,7 @@ # Key for toggling cinematic mode. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key -# keymap_cinematic = KEY_F8 +# keymap_cinematic = # Key for toggling display of minimap. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 @@ -1527,4 +1527,3 @@ # type: string # modstore_details_url = https://forum.minetest.net/mmdb/mod/*/ - diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 8ee26ecff..3220b915a 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -50,7 +50,7 @@ void set_default_settings(Settings *settings) settings->setDefault("keymap_freemove", "KEY_KEY_K"); settings->setDefault("keymap_fastmove", "KEY_KEY_J"); settings->setDefault("keymap_noclip", "KEY_KEY_H"); - settings->setDefault("keymap_cinematic", "KEY_F8"); + settings->setDefault("keymap_cinematic", ""); settings->setDefault("keymap_screenshot", "KEY_F12"); settings->setDefault("keymap_toggle_hud", "KEY_F1"); settings->setDefault("keymap_toggle_chat", "KEY_F2"); -- cgit v1.2.3 From 24ca754bd5cc2a6340d8a393a37b71643c6fda60 Mon Sep 17 00:00:00 2001 From: est31 Date: Tue, 12 Jul 2016 20:49:33 +0200 Subject: Update minetest.conf.example, and settings_translation_file.cpp --- minetest.conf.example | 21 +++++++++++++++++++++ src/settings_translation_file.cpp | 20 ++++++++++++++------ 2 files changed, 35 insertions(+), 6 deletions(-) (limited to 'minetest.conf.example') diff --git a/minetest.conf.example b/minetest.conf.example index bc0d4c527..704501f36 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -83,6 +83,20 @@ # type: bool # continuous_forward = false +# Enable Joysticks +# type: bool +# enable_joysticks = false + +# The time in seconds it takes between repeated events +# when holding down a joystick button combination. +# type: float +# repeat_joystick_button_time = 0.17 + +# The sensitivity of the joystick axes for moving the +# ingame view frustum around. +# type: float +# joystick_frustum_sensitivity = 170 + # Key for moving the player forward. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key @@ -732,6 +746,12 @@ # type: string # serverlist_url = servers.minetest.net +# Disable escape sequences, e.g. chat coloring. +# Use this if you want to run a server with pre-0.4.14 clients and you want to disable +# the escape sequences generated by mods. +# type: bool +# disable_escape_sequences = false + ## Network # Network port to listen (UDP). @@ -1527,3 +1547,4 @@ # type: string # modstore_details_url = https://forum.minetest.net/mmdb/mod/*/ + diff --git a/src/settings_translation_file.cpp b/src/settings_translation_file.cpp index f7e14dd65..78d1c799f 100644 --- a/src/settings_translation_file.cpp +++ b/src/settings_translation_file.cpp @@ -14,7 +14,7 @@ fake_function() { gettext("Noclip"); gettext("If enabled together with fly mode, player is able to fly through solid nodes.\nThis requires the \"noclip\" privilege on the server."); gettext("Cinematic mode"); - gettext("Smooths camera when moving and looking around.\nUseful for recording videos."); + gettext("Smooths camera when looking around. Also called look or mouse smoothing.\nUseful for recording videos."); gettext("Camera smoothing"); gettext("Smooths rotation of camera. 0 to disable."); gettext("Camera smoothing in cinematic mode"); @@ -35,6 +35,12 @@ fake_function() { gettext("Enable random user input (only used for testing)."); gettext("Continuous forward"); gettext("Continuous forward movement (only used for testing)."); + gettext("Enable Joysticks"); + gettext("Enable Joysticks"); + gettext("Joystick button repetition invterval"); + gettext("The time in seconds it takes between repeated events\nwhen holding down a joystick button combination."); + gettext("Joystick frustum sensitivity"); + gettext("The sensitivity of the joystick axes for moving the\ningame view frustum around."); gettext("Forward key"); gettext("Key for moving the player forward.\nSee http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3"); gettext("Backward key"); @@ -306,6 +312,8 @@ fake_function() { gettext("Automaticaly report to the serverlist."); gettext("Serverlist URL"); gettext("Announce to this serverlist.\nIf you want to announce your ipv6 address, use serverlist_url = v6.servers.minetest.net."); + gettext("Disable escape sequences"); + gettext("Disable escape sequences, e.g. chat coloring.\nUse this if you want to run a server with pre-0.4.14 clients and you want to disable\nthe escape sequences generated by mods."); gettext("Network"); gettext("Server port"); gettext("Network port to listen (UDP).\nThis value will be overridden when starting from the main menu."); @@ -437,7 +445,7 @@ fake_function() { gettext("Map generation limit"); gettext("Where the map generator stops.\nPlease note:\n- Limited to 31000 (setting above has no effect)\n- The map generator works in groups of 80x80x80 nodes (5x5x5 MapBlocks).\n- Those groups have an offset of -32, -32 nodes from the origin.\n- Only groups which are within the map_generation_limit are generated"); gettext("Mapgen flags"); - gettext("Global map generation attributes.\nIn Mapgen v6 the 'decorations' flag controls all decorations except trees\nand junglegrass, in all other mapgens this flag controls all decorations.\nThe default flags set in the engine are: caves, light, decorations\nThe flags string modifies the engine defaults.\nFlags that are not specified in the flag string are not modified from the default.\nFlags starting with 'no' are used to explicitly disable them."); + gettext("Global map generation attributes.\nIn Mapgen v6 the 'decorations' flag controls all decorations except trees\nand junglegrass, in all other mapgens this flag controls all decorations.\nFlags that are not specified in the flag string are not modified from the default.\nFlags starting with 'no' are used to explicitly disable them."); gettext("Advanced"); gettext("Chunk size"); gettext("Size of chunks to be generated at once by mapgen, stated in mapblocks (16 nodes)."); @@ -466,7 +474,7 @@ fake_function() { gettext("Mapgen v5 cave2 noise parameters"); gettext("Mapgen v6"); gettext("Mapgen v6 flags"); - gettext("Map generation attributes specific to Mapgen v6.\nWhen snowbiomes are enabled jungles are automatically enabled, the 'jungles' flag is ignored.\nThe default flags set in the engine are: biomeblend, mudflow\nThe flags string modifies the engine defaults.\nFlags that are not specified in the flag string are not modified from the default.\nFlags starting with 'no' are used to explicitly disable them."); + gettext("Map generation attributes specific to Mapgen v6.\nWhen snowbiomes are enabled jungles are automatically enabled, the 'jungles' flag is ignored.\nFlags that are not specified in the flag string are not modified from the default.\nFlags starting with 'no' are used to explicitly disable them."); gettext("Mapgen v6 desert frequency"); gettext("Controls size of deserts and beaches in Mapgen v6.\nWhen snowbiomes are enabled 'mgv6_freq_desert' is ignored."); gettext("Mapgen v6 beach frequency"); @@ -483,7 +491,7 @@ fake_function() { gettext("Mapgen v6 apple trees noise parameters"); gettext("Mapgen v7"); gettext("Mapgen v7 flags"); - gettext("Map generation attributes specific to Mapgen v7.\nThe 'ridges' flag controls the rivers.\nThe default flags set in the engine are: mountains, ridges\nThe flags string modifies the engine defaults.\nFlags that are not specified in the flag string are not modified from the default.\nFlags starting with 'no' are used to explicitly disable them."); + gettext("Map generation attributes specific to Mapgen v7.\nThe 'ridges' flag controls the rivers.\nFlags that are not specified in the flag string are not modified from the default.\nFlags starting with 'no' are used to explicitly disable them."); gettext("Mapgen v7 cave width"); gettext("Controls width of tunnels, a smaller value creates wider tunnels."); gettext("Mapgen v7 terrain base noise parameters"); @@ -499,7 +507,7 @@ fake_function() { gettext("Mapgen v7 cave2 noise parameters"); gettext("Mapgen flat"); gettext("Mapgen flat flags"); - gettext("Map generation attributes specific to Mapgen flat.\nOccasional lakes and hills can be added to the flat world.\nThe default flags set in the engine are: none\nThe flags string modifies the engine defaults.\nFlags that are not specified in the flag string are not modified from the default.\nFlags starting with 'no' are used to explicitly disable them."); + gettext("Map generation attributes specific to Mapgen flat.\nOccasional lakes and hills can be added to the flat world.\nFlags that are not specified in the flag string are not modified from the default.\nFlags starting with 'no' are used to explicitly disable them."); gettext("Mapgen flat ground level"); gettext("Y of flat ground."); gettext("Mapgen flat large cave depth"); @@ -547,7 +555,7 @@ fake_function() { gettext("Mapgen Valleys"); gettext("General"); gettext("Valleys C Flags"); - gettext("Map generation attributes specific to Mapgen Valleys.\n'altitude_chill' makes higher elevations colder, which may cause biome issues.\n'humid_rivers' modifies the humidity around rivers and in areas where water would tend to pool,\nit may interfere with delicately adjusted biomes.\nThe default flags set in the engine are: altitude_chill, humid_rivers\nThe flags string modifies the engine defaults.\nFlags that are not specified in the flag string are not modified from the default.\nFlags starting with 'no' are used to explicitly disable them."); + gettext("Map generation attributes specific to Mapgen Valleys.\n'altitude_chill' makes higher elevations colder, which may cause biome issues.\n'humid_rivers' modifies the humidity around rivers and in areas where water would tend to pool,\nit may interfere with delicately adjusted biomes.\nFlags that are not specified in the flag string are not modified from the default.\nFlags starting with 'no' are used to explicitly disable them."); gettext("Altitude Chill"); gettext("The altitude at which temperature drops by 20C"); gettext("Large cave depth"); -- cgit v1.2.3 From f833159a68f2ff605224ed7a5ac956e5a0ca42d8 Mon Sep 17 00:00:00 2001 From: est31 Date: Sun, 24 Jul 2016 17:41:36 +0200 Subject: Update minetest.conf.example and the settings translation file --- minetest.conf.example | 73 ++++++++++++++++++++++++++++++++------- src/settings_translation_file.cpp | 32 +++++++++++++---- 2 files changed, 87 insertions(+), 18 deletions(-) (limited to 'minetest.conf.example') diff --git a/minetest.conf.example b/minetest.conf.example index 704501f36..139909d29 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -973,18 +973,6 @@ # type: enum values: legacy, log, error # deprecated_lua_api_handling = legacy -# Useful for mod developers. -# type: bool -# mod_profiling = false - -# Detailed mod profile data. Useful for mod developers. -# type: bool -# detailed_profiling = false - -# Profiler data print interval. 0 = disable. Useful for developers. -# type: int -# profiler_print_interval = 0 - # Number of extra blocks that can be loaded by /clearobjects at once. # This is a trade-off between sqlite transaction overhead and # memory consumption (4096=100MB, as a rule of thumb). @@ -1476,6 +1464,63 @@ # type: string # secure.http_mods = +## Advanced + +### Profiling + +# Load the game profiler to collect game profiling data. +# Provides a /profiler command to access the compiled profile. +# Useful for mod developers and server operators. +# type: bool +# profiler.load = false + +# The default format in which profiles are being saved, +# when calling `/profiler save [format]` without format. +# type: enum values: txt, csv, lua, json, json_pretty +# profiler.default_report_format = txt + +# The file path relative to your worldpath in which profiles will be saved to. +# +# type: string +# profiler.report_path = "" + +#### Instrumentation + +# Instrument the methods of entities on registration. +# type: bool +# instrument.entity = true + +# Instrument the action function of Active Block Modifiers on registration. +# type: bool +# instrument.abm = true + +# Instrument the action function of Loading Block Modifiers on registration. +# type: bool +# instrument.lbm = true + +# Instrument chatcommands on registration. +# type: bool +# instrument.chatcommand = true + +# Instrument global callback functions on registration. +# (anything you pass to a minetest.register_*() function) +# type: bool +# instrument.global_callback = true + +##### Advanced + +# Instrument builtin. +# This is usually only needed by core/builtin contributors +# type: bool +# instrument.builtin = false + +# Have the profiler instrument itself: +# * Instrument an empty function. +# This estimates the overhead, that instrumentation is adding (+1 function call). +# * Instrument the sampler being used to update the statistics. +# type: bool +# instrument.profiler = false + # # Client and Server # @@ -1548,3 +1593,7 @@ # type: string # modstore_details_url = https://forum.minetest.net/mmdb/mod/*/ +# Print the engine's profiling data in regular intervals (in seconds). 0 = disable. Useful for developers. +# type: int +# profiler_print_interval = 0 + diff --git a/src/settings_translation_file.cpp b/src/settings_translation_file.cpp index 78d1c799f..3e82279cd 100644 --- a/src/settings_translation_file.cpp +++ b/src/settings_translation_file.cpp @@ -405,12 +405,6 @@ fake_function() { gettext("Advanced"); gettext("Deprecated Lua API handling"); gettext("Handling for deprecated lua api calls:\n- legacy: (try to) mimic old behaviour (default for release).\n- log: mimic and log backtrace of deprecated call (default for debug).\n- error: abort on usage of deprecated call (suggested for mod developers)."); - gettext("Mod profiling"); - gettext("Useful for mod developers."); - gettext("Detailed mod profiling"); - gettext("Detailed mod profile data. Useful for mod developers."); - gettext("Profiling print interval"); - gettext("Profiler data print interval. 0 = disable. Useful for developers."); gettext("Max. clearobjects extra blocks"); gettext("Number of extra blocks that can be loaded by /clearobjects at once.\nThis is a trade-off between sqlite transaction overhead and\nmemory consumption (4096=100MB, as a rule of thumb)."); gettext("Unload unused server data"); @@ -600,6 +594,30 @@ fake_function() { gettext("Comma-separated list of trusted mods that are allowed to access insecure\nfunctions even when mod security is on (via request_insecure_environment())."); gettext("HTTP Mods"); gettext("Comma-seperated list of mods that are allowed to access HTTP APIs, which\nallow them to upload and download data to/from the internet."); + gettext("Advanced"); + gettext("Profiling"); + gettext("Load the game profiler"); + gettext("Load the game profiler to collect game profiling data.\nProvides a /profiler command to access the compiled profile.\nUseful for mod developers and server operators."); + gettext("Default report format"); + gettext("The default format in which profiles are being saved,\nwhen calling `/profiler save [format]` without format."); + gettext("Report path"); + gettext("The file path relative to your worldpath in which profiles will be saved to.\n"); + gettext("Instrumentation"); + gettext("Entity methods"); + gettext("Instrument the methods of entities on registration."); + gettext("Active Block Modifiers"); + gettext("Instrument the action function of Active Block Modifiers on registration."); + gettext("Loading Block Modifiers"); + gettext("Instrument the action function of Loading Block Modifiers on registration."); + gettext("Chatcommands"); + gettext("Instrument chatcommands on registration."); + gettext("Global callbacks"); + gettext("Instrument global callback functions on registration.\n(anything you pass to a minetest.register_*() function)"); + gettext("Advanced"); + gettext("Builtin"); + gettext("Instrument builtin.\nThis is usually only needed by core/builtin contributors"); + gettext("Profiler"); + gettext("Have the profiler instrument itself:\n* Instrument an empty function.\nThis estimates the overhead, that instrumentation is adding (+1 function call).\n* Instrument the sampler being used to update the statistics."); gettext("Client and Server"); gettext("Player name"); gettext("Name of the player.\nWhen running a server, clients connecting with this name are admins.\nWhen starting from the main menu, this is overridden."); @@ -625,4 +643,6 @@ fake_function() { gettext("Modstore download URL"); gettext("Modstore mods list URL"); gettext("Modstore details URL"); + gettext("Engine profiling data print interval"); + gettext("Print the engine's profiling data in regular intervals (in seconds). 0 = disable. Useful for developers."); } -- cgit v1.2.3 From d1df09841d0eac7a88f638676b80ec848522cca5 Mon Sep 17 00:00:00 2001 From: Ben Deutsch Date: Tue, 2 Aug 2016 22:47:47 +0200 Subject: Document zoom_fov in settingtypes.txt and minetest.conf.example --- builtin/settingtypes.txt | 4 ++++ minetest.conf.example | 5 +++++ 2 files changed, 9 insertions(+) (limited to 'minetest.conf.example') diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index b5878dfe8..864485cce 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -435,6 +435,10 @@ vsync (V-Sync) bool false # Field of view in degrees. fov (Field of view) int 72 30 160 +# Field of view while zooming in degrees. +# This requires the "zoom" privilege on the server. +zoom_fov (Field of view for zoom) int 15 15 160 + # Adjust the gamma encoding for the light tables. Lower numbers are brighter. # This setting is for the client only and is ignored by the server. display_gamma (Gamma) float 1.8 1.0 3.0 diff --git a/minetest.conf.example b/minetest.conf.example index 139909d29..03a917a39 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -496,6 +496,11 @@ # type: int min: 30 max: 160 # fov = 72 +# Field of view while zooming in degrees. +# This requires the "zoom" privilege on the server. +# type: int min: 15 max: 160 +# zoom_fov = 15 + # Adjust the gamma encoding for the light tables. Lower numbers are brighter. # This setting is for the client only and is ignored by the server. # type: float min: 1 max: 3 -- cgit v1.2.3 From d767f025cb0d5cca29c1f2147d2a0931a088b717 Mon Sep 17 00:00:00 2001 From: est31 Date: Mon, 22 Aug 2016 04:27:44 +0200 Subject: Client: disable pre v25 init sending by default Disable the ability to connect to old servers by default to improve password security. If people still want to connect to old (0.4.12 and earlier) servers, they can flip the send_pre_v25_init setting. Add the ability to detect if we've tried to connect to a server which only supports the pre v25 init protocol, and show an apropriate error message. Most times the error will already be catched at the serverlist level, the detection mechanism only acts as last resort, because the "Connection timed out" error message that would be shown otherwise would be very confusing. Automatic "fixing" of this condition is not desired, as it would allow for downgrade attacks. As already 161 of the 167 servers on the serverlist support the new srp based auth protocol (> 96%), the breakage should be minimal. Follow up of commit af30183124d40a969040d7de4b3a487feec466e4 "Add option to not send pre v25 init packet" Also change the pessimistic assumption of masterlist server versions to optimistic, in order to avoid buggy behaviour (favourites not in the serverlist would be denied to connect to, etc). --- builtin/mainmenu/common.lua | 10 +++++++--- builtin/settingtypes.txt | 2 +- minetest.conf.example | 4 ++-- src/client.h | 3 +++ src/defaultsettings.cpp | 2 +- src/game.cpp | 21 ++++++++++++++++++++- 6 files changed, 34 insertions(+), 8 deletions(-) (limited to 'minetest.conf.example') diff --git a/builtin/mainmenu/common.lua b/builtin/mainmenu/common.lua index 1fd89ff77..da3667828 100644 --- a/builtin/mainmenu/common.lua +++ b/builtin/mainmenu/common.lua @@ -248,14 +248,18 @@ end -------------------------------------------------------------------------------- function is_server_protocol_compat(server_proto_min, server_proto_max) - return min_supp_proto <= (server_proto_max or 24) and max_supp_proto >= (server_proto_min or 13) + if (not server_proto_min) or (not server_proto_max) then + -- There is no info. Assume the best and act as if we would be compatible. + return true + end + return min_supp_proto <= server_proto_max and max_supp_proto >= server_proto_min end -------------------------------------------------------------------------------- function is_server_protocol_compat_or_error(server_proto_min, server_proto_max) if not is_server_protocol_compat(server_proto_min, server_proto_max) then local server_prot_ver_info, client_prot_ver_info - local s_p_min = server_proto_min or 13 - local s_p_max = server_proto_max or 24 + local s_p_min = server_proto_min + local s_p_max = server_proto_max if s_p_min ~= s_p_max then server_prot_ver_info = fgettext_ne("Server supports protocol versions between $1 and $2. ", diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index 864485cce..4d354a7ef 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -247,7 +247,7 @@ remote_port (Remote port) int 30000 1 65535 # Enable if you want to connect to 0.4.12 servers and before. # Servers starting with 0.4.13 will work, 0.4.12-dev servers may work. # Disabling this option will protect your password better. -send_pre_v25_init (Support older servers) bool true +send_pre_v25_init (Support older servers) bool false # Save the map received by the client on disk. enable_local_map_saving (Saving map received from server) bool false diff --git a/minetest.conf.example b/minetest.conf.example index 03a917a39..48c54c320 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -261,7 +261,7 @@ # Servers starting with 0.4.13 will work, 0.4.12-dev servers may work. # Disabling this option will protect your password better. # type: bool -# send_pre_v25_init = true +# send_pre_v25_init = false # Save the map received by the client on disk. # type: bool @@ -1485,7 +1485,7 @@ # profiler.default_report_format = txt # The file path relative to your worldpath in which profiles will be saved to. -# +# # type: string # profiler.report_path = "" diff --git a/src/client.h b/src/client.h index a7eb22ad9..b479062a0 100644 --- a/src/client.h +++ b/src/client.h @@ -499,6 +499,9 @@ public: u8 getProtoVersion() { return m_proto_ver; } + bool connectedToServer() + { return m_con.Connected(); } + float mediaReceiveProgress(); void afterContentReceived(IrrlichtDevice *device); diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 42b232afc..7c6f7ef3d 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -190,7 +190,7 @@ void set_default_settings(Settings *settings) settings->setDefault("minimap_shape_round", "true"); settings->setDefault("minimap_double_scan_height", "true"); - settings->setDefault("send_pre_v25_init", "true"); + settings->setDefault("send_pre_v25_init", "false"); settings->setDefault("curl_timeout", "5000"); settings->setDefault("curl_parallel_limit", "8"); diff --git a/src/game.cpp b/src/game.cpp index 1a036d03a..5a3b10879 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -2403,7 +2403,26 @@ bool Game::connectToServer(const std::string &playername, wait_time += dtime; // Only time out if we aren't waiting for the server we started if ((*address != "") && (wait_time > 10)) { - *error_message = "Connection timed out."; + bool sent_old_init = g_settings->getFlag("send_pre_v25_init"); + // If no pre v25 init was sent, and no answer was received, + // but the low level connection could be established + // (meaning that we have a peer id), then we probably wanted + // to connect to a legacy server. In this case, tell the user + // to enable the option to be able to connect. + if (!sent_old_init && + (client->getProtoVersion() == 0) && + client->connectedToServer()) { + *error_message = "Connection failure: init packet not " + "recognized by server.\n" + "Most likely the server uses an old protocol version ( Network -> Support older Servers'\n" + "entry in the advanced settings menu."; + } else { + *error_message = "Connection timed out."; + } errorstream << *error_message << std::endl; break; } -- cgit v1.2.3 From 1f2ff860f53438e8afacc859cc6f48ebfcfc21db Mon Sep 17 00:00:00 2001 From: est31 Date: Tue, 30 Aug 2016 04:40:54 +0200 Subject: Update minetest.conf.example and settings_translation_file.cpp --- minetest.conf.example | 14 +++++++------- src/settings_translation_file.cpp | 23 +++++++++++++---------- 2 files changed, 20 insertions(+), 17 deletions(-) (limited to 'minetest.conf.example') diff --git a/minetest.conf.example b/minetest.conf.example index 48c54c320..2465907ad 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -208,7 +208,7 @@ # type: key # keymap_toggle_force_fog_off = KEY_F3 -# Key for toggling the camrea update. Only used for development +# Key for toggling the camera update. Only used for development # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_toggle_update_camera = @@ -369,7 +369,7 @@ #### Shaders -# Shaders allow advanced visul effects and may increase performance on some video cards. +# Shaders allow advanced visual effects and may increase performance on some video cards. # Thy only work with the OpenGL video backend. # type: bool # enable_shaders = true @@ -633,7 +633,7 @@ # When gui_scaling_filter_txr2img is true, copy those images # from hardware to software for scaling. When false, fall back # to the old scaling method, for video drivers that don't -# propery support downloading textures back from hardware. +# properly support downloading textures back from hardware. # type: bool # gui_scaling_filter_txr2img = true @@ -789,11 +789,11 @@ ### Advanced -# How many blocks are flying in the wire simultaneously per client. +# Maximum number of blocks that are simultaneously sent per client. # type: int # max_simultaneous_block_sends_per_client = 10 -# How many blocks are flying in the wire simultaneously for the whole server. +# Maximum number of blocks that are simultaneously sent in total. # type: int # max_simultaneous_block_sends_server_total = 40 @@ -1464,7 +1464,7 @@ # type: string # secure.trusted_mods = -# Comma-seperated list of mods that are allowed to access HTTP APIs, which +# Comma-separated list of mods that are allowed to access HTTP APIs, which # allow them to upload and download data to/from the internet. # type: string # secure.http_mods = @@ -1485,7 +1485,7 @@ # profiler.default_report_format = txt # The file path relative to your worldpath in which profiles will be saved to. -# +# # type: string # profiler.report_path = "" diff --git a/src/settings_translation_file.cpp b/src/settings_translation_file.cpp index 10e38e1a7..4b6a50b80 100644 --- a/src/settings_translation_file.cpp +++ b/src/settings_translation_file.cpp @@ -37,7 +37,7 @@ fake_function() { gettext("Continuous forward movement (only used for testing)."); gettext("Enable Joysticks"); gettext("Enable Joysticks"); - gettext("Joystick button repetition invterval"); + gettext("Joystick button repetition interval"); gettext("The time in seconds it takes between repeated events\nwhen holding down a joystick button combination."); gettext("Joystick frustum sensitivity"); gettext("The sensitivity of the joystick axes for moving the\ningame view frustum around."); @@ -86,7 +86,7 @@ fake_function() { gettext("Fog toggle key"); gettext("Key for toggling the display of the fog.\nSee http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3"); gettext("Camera update toggle key"); - gettext("Key for toggling the camrea update. Only used for development\nSee http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3"); + gettext("Key for toggling the camera update. Only used for development\nSee http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3"); gettext("Debug info toggle key"); gettext("Key for toggling the display of debug info.\nSee http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3"); gettext("Profiler toggle key"); @@ -152,7 +152,7 @@ fake_function() { gettext("Experimental option, might cause visible spaces between blocks\nwhen set to higher number than 0."); gettext("Shaders"); gettext("Shaders"); - gettext("Shaders allow advanced visul effects and may increase performance on some video cards.\nThy only work with the OpenGL video backend."); + gettext("Shaders allow advanced visual effects and may increase performance on some video cards.\nThy only work with the OpenGL video backend."); gettext("Tone Mapping"); gettext("Filmic tone mapping"); gettext("Enables filmic tone mapping"); @@ -207,6 +207,8 @@ fake_function() { gettext("Vertical screen synchronization."); gettext("Field of view"); gettext("Field of view in degrees."); + gettext("Field of view for zoom"); + gettext("Field of view while zooming in degrees.\nThis requires the \"zoom\" privilege on the server."); gettext("Gamma"); gettext("Adjust the gamma encoding for the light tables. Lower numbers are brighter.\nThis setting is for the client only and is ignored by the server."); gettext("Texture path"); @@ -261,7 +263,7 @@ fake_function() { gettext("GUI scaling filter"); gettext("When gui_scaling_filter is true, all GUI images need to be\nfiltered in software, but some images are generated directly\nto hardware (e.g. render-to-texture for nodes in inventory)."); gettext("GUI scaling filter txr2img"); - gettext("When gui_scaling_filter_txr2img is true, copy those images\nfrom hardware to software for scaling. When false, fall back\nto the old scaling method, for video drivers that don't\npropery support downloading textures back from hardware."); + gettext("When gui_scaling_filter_txr2img is true, copy those images\nfrom hardware to software for scaling. When false, fall back\nto the old scaling method, for video drivers that don't\nproperly support downloading textures back from hardware."); gettext("Tooltip delay"); gettext("Delay showing tooltips, stated in milliseconds."); gettext("Freetype fonts"); @@ -326,10 +328,11 @@ fake_function() { gettext("IPv6 server"); gettext("Enable/disable running an IPv6 server. An IPv6 server may be restricted\nto IPv6 clients, depending on system configuration.\nIgnored if bind_address is set."); gettext("Advanced"); - gettext("Maximum simultaneously blocks send per client"); - gettext("How many blocks are flying in the wire simultaneously per client."); - gettext("Maximum simultaneously bocks send total"); - gettext("How many blocks are flying in the wire simultaneously for the whole server."); + gettext("Maximum simultaneous block sends per client"); + gettext("Maximum number of blocks that are simultaneously sent per client."); + gettext("Maximum simultaneous block sends total"); + gettext("Maximum number of blocks that are simultaneously sent in total."); + gettext("Delay in sending blocks after building"); gettext("To reduce lag, block transfers are slowed down when a player is building something.\nThis determines how long they are slowed down after placing or removing a node."); gettext("Max. packets per iteration"); gettext("Maximum number of packets sent per send step, if you have a slow connection\ntry reducing it, but don't reduce it to a number below double of targeted\nclient number."); @@ -409,7 +412,7 @@ fake_function() { gettext("Number of extra blocks that can be loaded by /clearobjects at once.\nThis is a trade-off between sqlite transaction overhead and\nmemory consumption (4096=100MB, as a rule of thumb)."); gettext("Unload unused server data"); gettext("How much the server will wait before unloading unused mapblocks.\nHigher value is smoother, but will use more RAM."); - gettext("Maxmimum objects per block"); + gettext("Maximum objects per block"); gettext("Maximum number of statically stored objects in a block."); gettext("Synchronous SQLite"); gettext("See http://www.sqlite.org/pragma.html#pragma_synchronous"); @@ -593,7 +596,7 @@ fake_function() { gettext("Trusted mods"); gettext("Comma-separated list of trusted mods that are allowed to access insecure\nfunctions even when mod security is on (via request_insecure_environment())."); gettext("HTTP Mods"); - gettext("Comma-seperated list of mods that are allowed to access HTTP APIs, which\nallow them to upload and download data to/from the internet."); + gettext("Comma-separated list of mods that are allowed to access HTTP APIs, which\nallow them to upload and download data to/from the internet."); gettext("Advanced"); gettext("Profiling"); gettext("Load the game profiler"); -- cgit v1.2.3 From 3b0f7659c75f24f4ae2411c7ab49fe150e1911c1 Mon Sep 17 00:00:00 2001 From: Rui Date: Tue, 30 Aug 2016 12:40:48 +0900 Subject: Document keymap_autorun in settingtypes.txt and minetest.conf.example (#4486) --- builtin/settingtypes.txt | 4 ++++ minetest.conf.example | 5 +++++ src/settings_translation_file.cpp | 2 ++ 3 files changed, 11 insertions(+) (limited to 'minetest.conf.example') diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index aadcb5de8..4622a7217 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -176,6 +176,10 @@ keymap_fastmove (Fast key) key KEY_KEY_J # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 keymap_noclip (Noclip key) key KEY_KEY_H +# Key for toggling autorun. +# See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 +keymap_autorun (Autorun key) key + # Key for toggling cinematic mode. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 keymap_cinematic (Cinematic mode key) key diff --git a/minetest.conf.example b/minetest.conf.example index 2465907ad..3d9b77306 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -173,6 +173,11 @@ # type: key # keymap_noclip = KEY_KEY_H +# Key for toggling autorun. +# See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 +# type: key +# keymap_autorun = + # Key for toggling cinematic mode. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key diff --git a/src/settings_translation_file.cpp b/src/settings_translation_file.cpp index 4b6a50b80..bebada2f8 100644 --- a/src/settings_translation_file.cpp +++ b/src/settings_translation_file.cpp @@ -71,6 +71,8 @@ fake_function() { gettext("Key for toggling fast mode.\nSee http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3"); gettext("Noclip key"); gettext("Key for toggling noclip mode.\nSee http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3"); + gettext("Autorun key"); + gettext("Key for toggling autorun.\nSee http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3"); gettext("Cinematic mode key"); gettext("Key for toggling cinematic mode.\nSee http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3"); gettext("Minimap key"); -- cgit v1.2.3 From 679c8de63ffb7119f2b99b00883bc959f5917da4 Mon Sep 17 00:00:00 2001 From: James Stevenson Date: Thu, 15 Sep 2016 11:53:17 -0400 Subject: Increase default font size by 1 --- builtin/settingtypes.txt | 4 ++-- minetest.conf.example | 4 ++-- src/constants.h | 2 +- src/defaultsettings.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'minetest.conf.example') diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index 4622a7217..15fab0f30 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -561,13 +561,13 @@ freetype (Freetype fonts) bool true # Path to TrueTypeFont or bitmap. font_path (Font path) path fonts/liberationsans.ttf -font_size (Font size) int 15 +font_size (Font size) int 16 # Font shadow offset, if 0 then shadow will not be drawn. font_shadow (Font shadow) int 1 # Font shadow alpha (opaqueness, between 0 and 255). -font_shadow_alpha (Font shadow alpha) int 128 0 255 +font_shadow_alpha (Font shadow alpha) int 127 0 255 mono_font_path (Monospace font path) path fonts/liberationmono.ttf diff --git a/minetest.conf.example b/minetest.conf.example index 3d9b77306..bedc8c579 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -655,7 +655,7 @@ # font_path = fonts/liberationsans.ttf # type: int -# font_size = 15 +# font_size = 16 # Font shadow offset, if 0 then shadow will not be drawn. # type: int @@ -663,7 +663,7 @@ # Font shadow alpha (opaqueness, between 0 and 255). # type: int min: 0 max: 255 -# font_shadow_alpha = 128 +# font_shadow_alpha = 127 # type: path # mono_font_path = fonts/liberationmono.ttf diff --git a/src/constants.h b/src/constants.h index b606fc4fa..55ae9daf3 100644 --- a/src/constants.h +++ b/src/constants.h @@ -112,7 +112,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #if defined(_WIN32) #define TTF_DEFAULT_FONT_SIZE (18) #else - #define TTF_DEFAULT_FONT_SIZE (15) + #define TTF_DEFAULT_FONT_SIZE (16) #endif #define DEFAULT_FONT_SIZE (10) diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 7c6f7ef3d..4520bac2f 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -213,7 +213,7 @@ void set_default_settings(Settings *settings) settings->setDefault("freetype", "true"); settings->setDefault("font_path", porting::getDataPath("fonts" DIR_DELIM "liberationsans.ttf")); settings->setDefault("font_shadow", "1"); - settings->setDefault("font_shadow_alpha", "128"); + settings->setDefault("font_shadow_alpha", "127"); settings->setDefault("mono_font_path", porting::getDataPath("fonts" DIR_DELIM "liberationmono.ttf")); settings->setDefault("fallback_font_path", porting::getDataPath("fonts" DIR_DELIM "DroidSansFallbackFull.ttf")); -- cgit v1.2.3 From cd2c8ade2d86f709d9a82b7ad86284cc3e9ce8c3 Mon Sep 17 00:00:00 2001 From: paramat Date: Fri, 23 Sep 2016 17:01:49 +0100 Subject: Conf.example: Re-add deleted noise parameter documentation Re-add documentation of noise parameter formats. Re-add 'mgv5_np_ground' noise parameters in group format. Both these were deleted through auto-generation of conf.example. Add note to builtin/mainmenu/dlg_settings_advanced.lua that this documentation must be preserved. --- builtin/mainmenu/dlg_settings_advanced.lua | 9 +++++++- minetest.conf.example | 33 ++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) (limited to 'minetest.conf.example') diff --git a/builtin/mainmenu/dlg_settings_advanced.lua b/builtin/mainmenu/dlg_settings_advanced.lua index 68b5fd4ef..06def72a3 100644 --- a/builtin/mainmenu/dlg_settings_advanced.lua +++ b/builtin/mainmenu/dlg_settings_advanced.lua @@ -659,5 +659,12 @@ function create_adv_settings_dlg() return dlg end --- generate minetest.conf.example and settings_translation_file.cpp: +-- Generate minetest.conf.example and settings_translation_file.cpp + +-- *** Please note *** +-- There is text in minetest.conf.example that will not be generated from +-- settingtypes.txt but must be preserved: +-- The documentation of mapgen noise parameter formats (title plus 16 lines) +-- Noise parameter 'mgv5_np_ground' in group format (13 lines) + --assert(loadfile(core.get_mainmenu_path()..DIR_DELIM.."generate_from_settingtypes.lua"))(parse_config_file(true, false)) diff --git a/minetest.conf.example b/minetest.conf.example index bedc8c579..9c8015625 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -1099,6 +1099,25 @@ # type: int # num_emerge_threads = 1 +#### Noise parameters and formats + +# Noise parameters can be specified as a set of positional values, for example: +# Offset, scale, (spread factors), seed offset, number of octaves, persistence, lacunarity +# mgv6_np_terrain_base = -4, 20, (250, 250, 250), 82341, 5, 0.6, 2.0 +# Or the group format can be used instead, for example: +# mgv6_np_terrain_base = { +# offset = -4, +# scale = 20, +# spread = (250, 250, 250), +# seed = 82341, +# octaves = 5, +# persistence = 0.6, +# lacunarity = 2.0, +# flags = "defaults" +# } +# Only the group format supports noise flags which are needed for eased noise. +# Mgv5 uses eased noise for np_ground so this is shown in group format below. + # Noise parameters for biome API temperature, humidity and biome blend. # type: noise_params # mg_biome_np_heat = 50, 50, (750, 750, 750), 5349, 3, 0.5, 2.0 @@ -1133,6 +1152,20 @@ # type: noise_params # mgv5_np_cave2 = 0, 12, (50, 50, 50), 10325, 4, 0.5, 2.0 +# Noise parameters in group format, unsupported by advanced settings +# menu but settable in minetest.conf. +# See documentation of noise parameter formats above. +# mgv5_np_ground = { +# offset = 0, +# scale = 40, +# spread = (80, 80, 80), +# seed = 983240, +# octaves = 4, +# persistence = 0.55, +# lacunarity = 2.0, +# flags = "eased" +# } + #### Mapgen v6 # Map generation attributes specific to Mapgen v6. -- cgit v1.2.3 From d4c76258e37337ea585cf24d8e05b50a30fa307d Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Tue, 4 Oct 2016 18:17:12 +0200 Subject: Chat: new settings to prevent spam Added the following chat coreside features * Chat messages length limit * Message rate limiting * Message rate kicking Note: * handleChat now takes RemotePlayer pointer instead of u16 to remove useless lookups --- builtin/settingtypes.txt | 9 ++++++ minetest.conf.example | 14 +++++++++- src/defaultsettings.cpp | 3 ++ src/network/serverpackethandler.cpp | 10 +++---- src/player.cpp | 56 ++++++++++++++++++++++++++++++++++++- src/player.h | 16 ++++++++++- src/server.cpp | 25 +++++++++++++++-- src/server.h | 3 +- 8 files changed, 125 insertions(+), 11 deletions(-) (limited to 'minetest.conf.example') diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index 15fab0f30..95cc826a0 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -774,6 +774,15 @@ time_speed (Time speed) int 72 # Interval of saving important changes in the world, stated in seconds. server_map_save_interval (Map save interval) float 5.3 +# Set the maximum character length of a chat message sent by clients. +# chat_message_max_size int 500 + +# Limit a single player to send X messages per 10 seconds. +# chat_message_limit_per_10sec float 10.0 + +# Kick player if send more than X messages per 10 seconds. +# chat_message_limit_trigger_kick int 50 + [**Physics] movement_acceleration_default (Default acceleration) float 3 diff --git a/minetest.conf.example b/minetest.conf.example index 9c8015625..b1b202786 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -933,6 +933,18 @@ # type: float # server_map_save_interval = 5.3 +# Set the maximum character length of a chat message sent by clients. (0 to disable) +# type: integer +# chat_message_max_size = 500 + +# Limit a single player to send X messages per 10 seconds. (0 to disable) +# type: float +# chat_message_limit_per_10sec = 8.0 + +# Kick player if send more than X messages per 10 seconds. (0 to disable) +# type: integer +# chat_message_limit_trigger_kick = 50 + ### Physics # type: float @@ -1523,7 +1535,7 @@ # profiler.default_report_format = txt # The file path relative to your worldpath in which profiles will be saved to. -# +# # type: string # profiler.report_path = "" diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 4520bac2f..00c233a42 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -285,6 +285,9 @@ void set_default_settings(Settings *settings) settings->setDefault("server_unload_unused_data_timeout", "29"); settings->setDefault("max_objects_per_block", "49"); settings->setDefault("server_map_save_interval", "5.3"); + settings->setDefault("chat_message_max_size", "500"); + settings->setDefault("chat_message_limit_per_10sec", "8.0"); + settings->setDefault("chat_message_limit_trigger_kick", "50"); settings->setDefault("sqlite_synchronous", "2"); settings->setDefault("full_block_send_enable_min_time_from_building", "2.0"); settings->setDefault("dedicated_server_step", "0.1"); diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp index 1bcb78a8a..a8bfd9068 100644 --- a/src/network/serverpackethandler.cpp +++ b/src/network/serverpackethandler.cpp @@ -1065,7 +1065,7 @@ void Server::handleCommand_ChatMessage(NetworkPacket* pkt) std::wstring wname = narrow_to_wide(name); std::wstring answer_to_sender = handleChat(name, wname, message, - true, pkt->getPeerId()); + true, dynamic_cast(player)); if (!answer_to_sender.empty()) { // Send the answer to sender SendChatMessage(pkt->getPeerId(), answer_to_sender); @@ -1656,16 +1656,16 @@ void Server::handleCommand_Interact(NetworkPacket* pkt) } } // action == 4 - + /* 5: rightclick air */ else if (action == 5) { ItemStack item = playersao->getWieldedItem(); - - actionstream << player->getName() << " activates " + + actionstream << player->getName() << " activates " << item.name << std::endl; - + if (m_script->item_OnSecondaryUse( item, playersao)) { if( playersao->setWieldedItem(item)) { diff --git a/src/player.cpp b/src/player.cpp index 5949712a5..fd72d63b6 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -227,10 +227,25 @@ void Player::clearHud() } } +// static config cache for remoteplayer +bool RemotePlayer::m_setting_cache_loaded = false; +float RemotePlayer::m_setting_chat_message_limit_per_10sec = 0.0f; +u16 RemotePlayer::m_setting_chat_message_limit_trigger_kick = 0; + RemotePlayer::RemotePlayer(IGameDef *gamedef, const char *name): Player(gamedef, name), - m_sao(NULL) + m_sao(NULL), + m_last_chat_message_sent(time(NULL)), + m_chat_message_allowance(5.0f), + m_message_rate_overhead(0) { + if (!RemotePlayer::m_setting_cache_loaded) { + RemotePlayer::m_setting_chat_message_limit_per_10sec = + g_settings->getFloat("chat_message_limit_per_10sec"); + RemotePlayer::m_setting_chat_message_limit_trigger_kick = + g_settings->getU16("chat_message_limit_trigger_kick"); + RemotePlayer::m_setting_cache_loaded = true; + } movement_acceleration_default = g_settings->getFloat("movement_acceleration_default") * BS; movement_acceleration_air = g_settings->getFloat("movement_acceleration_air") * BS; movement_acceleration_fast = g_settings->getFloat("movement_acceleration_fast") * BS; @@ -304,3 +319,42 @@ void RemotePlayer::setPosition(const v3f &position) m_sao->setBasePosition(position); } +const RemotePlayerChatResult RemotePlayer::canSendChatMessage() +{ + // Rate limit messages + u32 now = time(NULL); + float time_passed = now - m_last_chat_message_sent; + m_last_chat_message_sent = now; + + // If this feature is disabled + if (m_setting_chat_message_limit_per_10sec <= 0.0) { + return RPLAYER_CHATRESULT_OK; + } + + m_chat_message_allowance += time_passed * (m_setting_chat_message_limit_per_10sec / 8.0f); + if (m_chat_message_allowance > m_setting_chat_message_limit_per_10sec) { + m_chat_message_allowance = m_setting_chat_message_limit_per_10sec; + } + + if (m_chat_message_allowance < 1.0f) { + infostream << "Player " << m_name + << " chat limited due to excessive message amount." << std::endl; + + // Kick player if flooding is too intensive + m_message_rate_overhead++; + if (m_message_rate_overhead > RemotePlayer::m_setting_chat_message_limit_trigger_kick) { + return RPLAYER_CHATRESULT_KICK; + } + + return RPLAYER_CHATRESULT_FLOODING; + } + + // Reinit message overhead + if (m_message_rate_overhead > 0) { + m_message_rate_overhead = 0; + } + + m_chat_message_allowance -= 1.0f; + return RPLAYER_CHATRESULT_OK; +} + diff --git a/src/player.h b/src/player.h index eab00bb04..f38effa9d 100644 --- a/src/player.h +++ b/src/player.h @@ -439,7 +439,11 @@ private: Mutex m_mutex; }; - +enum RemotePlayerChatResult { + RPLAYER_CHATRESULT_OK, + RPLAYER_CHATRESULT_FLOODING, + RPLAYER_CHATRESULT_KICK, +}; /* Player on the server */ @@ -457,8 +461,18 @@ public: { m_sao = sao; } void setPosition(const v3f &position); + const RemotePlayerChatResult canSendChatMessage(); + private: PlayerSAO *m_sao; + + static bool m_setting_cache_loaded; + static float m_setting_chat_message_limit_per_10sec; + static u16 m_setting_chat_message_limit_trigger_kick; + + u32 m_last_chat_message_sent; + float m_chat_message_allowance; + u16 m_message_rate_overhead; }; #endif diff --git a/src/server.cpp b/src/server.cpp index fb241f179..c615aee13 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -358,6 +358,7 @@ Server::Server( add_legacy_abms(m_env, m_nodedef); m_liquid_transform_every = g_settings->getFloat("liquid_update"); + m_max_chatmessage_length = g_settings->getU16("chat_message_max_size"); } Server::~Server() @@ -2734,8 +2735,7 @@ void Server::handleChatInterfaceEvent(ChatEvent *evt) } std::wstring Server::handleChat(const std::string &name, const std::wstring &wname, - const std::wstring &wmessage, bool check_shout_priv, - u16 peer_id_to_avoid_sending) + const std::wstring &wmessage, bool check_shout_priv, RemotePlayer *player) { // If something goes wrong, this player is to blame RollbackScopeActor rollback_scope(m_rollback, @@ -2753,6 +2753,26 @@ std::wstring Server::handleChat(const std::string &name, const std::wstring &wna if (ate) return L""; + switch (player->canSendChatMessage()) { + case RPLAYER_CHATRESULT_FLOODING: { + std::wstringstream ws; + ws << L"You cannot send more messages. You are limited to " + << g_settings->getFloat("chat_message_limit_per_10sec") + << " messages per 10 seconds."; + return ws.str(); + } + case RPLAYER_CHATRESULT_KICK: + DenyAccess_Legacy(player->peer_id, L"You have been kicked due to message flooding."); + return L""; + case RPLAYER_CHATRESULT_OK: break; + default: FATAL_ERROR("Unhandled chat filtering result found."); + } + + if (m_max_chatmessage_length > 0 && wmessage.length() > m_max_chatmessage_length) { + return L"Your message exceed the maximum chat message limit set on the server. " + "It was refused. Send a shorter message"; + } + // Commands are implemented in Lua, so only catch invalid // commands that were not "eaten" and send an error back if (wmessage[0] == L'/') { @@ -2787,6 +2807,7 @@ std::wstring Server::handleChat(const std::string &name, const std::wstring &wna std::vector clients = m_clients.getClientIDs(); + u16 peer_id_to_avoid_sending = (player ? player->peer_id : PEER_ID_INEXISTENT); for (u16 i = 0; i < clients.size(); i++) { u16 cid = clients[i]; if (cid != peer_id_to_avoid_sending) diff --git a/src/server.h b/src/server.h index 7ee15a463..3ad894b38 100644 --- a/src/server.h +++ b/src/server.h @@ -487,7 +487,7 @@ private: std::wstring handleChat(const std::string &name, const std::wstring &wname, const std::wstring &wmessage, bool check_shout_priv = false, - u16 peer_id_to_avoid_sending = PEER_ID_INEXISTENT); + RemotePlayer *player = NULL); void handleAdminChat(const ChatEventChat *evt); v3f findSpawnPos(); @@ -522,6 +522,7 @@ private: // If true, do not allow multiple players and hide some multiplayer // functionality bool m_simple_singleplayer_mode; + u16 m_max_chatmessage_length; // Thread can set; step() will throw as ServerError MutexedVariable m_async_fatal_error; -- cgit v1.2.3 From b6569f1c699e8bd3dfef50c64272fdb035b43b6c Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sun, 9 Oct 2016 10:53:13 +0200 Subject: Add missing languages to the settings --- builtin/settingtypes.txt | 2 +- minetest.conf.example | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'minetest.conf.example') diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index 95cc826a0..0a6c21a46 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -1225,7 +1225,7 @@ name (Player name) string # Set the language. Leave empty to use the system language. # A restart is required after changing this. -language (Language) enum ,be,cs,da,de,eo,es,et,fr,hu,id,it,ja,jbo,ko,ky,lt,nb,nl,pl,pt,pt_BR,ro,ru,tr,uk,zh_CN,zh_TW +language (Language) enum ,be,ca,cs,da,de,en,eo,es,et,fr,he,hu,id,it,ja,jbo,ko,ky,lt,nb,nl,pl,pt,pt_BR,ro,ru,sr_Cyrl,tr,uk,zh_CN,zh_TW # Level of logging to be written to debug.txt: # - (no logging) diff --git a/minetest.conf.example b/minetest.conf.example index b1b202786..465e1d069 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -1588,7 +1588,7 @@ # Set the language. Leave empty to use the system language. # A restart is required after changing this. -# type: enum values: , be, cs, da, de, eo, es, et, fr, hu, id, it, ja, jbo, ko, ky, lt, nb, nl, pl, pt, pt_BR, ro, ru, tr, uk, zh_CN, zh_TW +# type: enum values: , be, ca, cs, da, de, en, eo, es, et, fr, he, hu, id, it, ja, jbo, ko, ky, lt, nb, nl, pl, pt, pt_BR, ro, ru, sr_Cyrl, tr, uk, zh_CN, zh_TW # language = # Level of logging to be written to debug.txt: -- cgit v1.2.3 From 2ff054d0419535a9422a957d50491ed119d6eb73 Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Sun, 9 Oct 2016 14:36:22 -0400 Subject: Enable mod security by default --- builtin/settingtypes.txt | 2 +- minetest.conf.example | 2 +- src/defaultsettings.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'minetest.conf.example') diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index 0a6c21a46..9b5f386e0 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -1161,7 +1161,7 @@ mgvalleys_np_inter_valley_slope (Valley Slope) noise_params 0.5, 0.5, (128, 128, [*Security] # Prevent mods from doing insecure things like running shell commands. -secure.enable_security (Enable mod security) bool false +secure.enable_security (Enable mod security) bool true # Comma-separated list of trusted mods that are allowed to access insecure # functions even when mod security is on (via request_insecure_environment()). diff --git a/minetest.conf.example b/minetest.conf.example index 465e1d069..e24d3a384 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -1507,7 +1507,7 @@ # Prevent mods from doing insecure things like running shell commands. # type: bool -# secure.enable_security = false +# secure.enable_security = true # Comma-separated list of trusted mods that are allowed to access insecure # functions even when mod security is on (via request_insecure_environment()). diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 00c233a42..522aa8481 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -301,7 +301,7 @@ void set_default_settings(Settings *settings) settings->setDefault("emergequeue_limit_diskonly", "32"); settings->setDefault("emergequeue_limit_generate", "32"); settings->setDefault("num_emerge_threads", "1"); - settings->setDefault("secure.enable_security", "false"); + settings->setDefault("secure.enable_security", "true"); settings->setDefault("secure.trusted_mods", ""); settings->setDefault("secure.http_mods", ""); -- cgit v1.2.3 From 63a3bb229a9ff288ab01e3e80c8477da5e84ee1e Mon Sep 17 00:00:00 2001 From: paramat Date: Wed, 19 Oct 2016 01:37:12 +0100 Subject: Changes to static object storage limit and error message Move static object storage force-delete message from errorstream to warningstream. Increase 'max objects per block' setting to 64. Add missing spaces in warning code. --- builtin/settingtypes.txt | 2 +- minetest.conf.example | 2 +- src/defaultsettings.cpp | 2 +- src/environment.cpp | 14 +++++++------- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'minetest.conf.example') diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index 9b5f386e0..492d7c79d 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -817,7 +817,7 @@ max_clearobjects_extra_loaded_blocks (Max. clearobjects extra blocks) int 4096 server_unload_unused_data_timeout (Unload unused server data) int 29 # Maximum number of statically stored objects in a block. -max_objects_per_block (Maximum objects per block) int 49 +max_objects_per_block (Maximum objects per block) int 64 # See http://www.sqlite.org/pragma.html#pragma_synchronous sqlite_synchronous (Synchronous SQLite) enum 2 0,1,2 diff --git a/minetest.conf.example b/minetest.conf.example index e24d3a384..b7d705bac 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -1008,7 +1008,7 @@ # Maximum number of statically stored objects in a block. # type: int -# max_objects_per_block = 49 +# max_objects_per_block = 64 # See http://www.sqlite.org/pragma.html#pragma_synchronous # type: enum values: 0, 1, 2 diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 522aa8481..a64840a8f 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -283,7 +283,7 @@ void set_default_settings(Settings *settings) settings->setDefault("time_send_interval", "5"); settings->setDefault("time_speed", "72"); settings->setDefault("server_unload_unused_data_timeout", "29"); - settings->setDefault("max_objects_per_block", "49"); + settings->setDefault("max_objects_per_block", "64"); settings->setDefault("server_map_save_interval", "5.3"); settings->setDefault("chat_message_max_size", "500"); settings->setDefault("chat_message_limit_per_10sec", "8.0"); diff --git a/src/environment.cpp b/src/environment.cpp index ceaf40d89..ecda1b6a4 100644 --- a/src/environment.cpp +++ b/src/environment.cpp @@ -2175,13 +2175,13 @@ void ServerEnvironment::deactivateFarObjects(bool force_delete) if(block) { - if(block->m_static_objects.m_stored.size() >= g_settings->getU16("max_objects_per_block")){ - errorstream<<"ServerEnv: Trying to store id="<getId() - <<" statically but block "<m_static_objects.m_stored.size() - <<" objects." - <<" Forcing delete."<m_static_objects.m_stored.size() >= g_settings->getU16("max_objects_per_block")) { + warningstream << "ServerEnv: Trying to store id = " << obj->getId() + << " statically but block " << PP(blockpos) + << " already contains " + << block->m_static_objects.m_stored.size() + << " objects." + << " Forcing delete." << std::endl; force_delete = true; } else { // If static counterpart already exists in target block, -- cgit v1.2.3 From c79370023b322df2195f80a2f2d2b5b142add2bb Mon Sep 17 00:00:00 2001 From: Lars Hofhansl Date: Mon, 7 Nov 2016 20:44:40 -0800 Subject: Conf.example: Document block_send_optimize_distance Add missing documentation. --- minetest.conf.example | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'minetest.conf.example') diff --git a/minetest.conf.example b/minetest.conf.example index b7d705bac..02f31779f 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -945,6 +945,14 @@ # type: integer # chat_message_limit_trigger_kick = 50 +# At this distance the server will aggressively optimize which blocks are sent to clients. +# Small values potentially improve performance a lot, at the expense of visible rendering glitches. +# (some blocks will not be rendered under water and in caves, as well as sometimes on land) +# Setting this to a value greater than max_block_send_distance disables this optimization. +# Stated in mapblocks (16 nodes) +# type: int +# block_send_optimize_distance = 4 + ### Physics # type: float -- cgit v1.2.3 From bc3980e1d69ca9f848f80eb7386525fa4fb326cd Mon Sep 17 00:00:00 2001 From: paramat Date: Fri, 16 Sep 2016 04:59:25 +0100 Subject: Mgv7: Add optional floatlands, disabled by default --- builtin/settingtypes.txt | 24 +++++- minetest.conf.example | 29 ++++++- src/mapgen_v7.cpp | 212 ++++++++++++++++++++++++++++++++++------------- src/mapgen_v7.h | 24 +++++- 4 files changed, 221 insertions(+), 68 deletions(-) (limited to 'minetest.conf.example') diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index e48fc9bc5..b1f31054e 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -963,23 +963,39 @@ mgv6_np_apple_trees (Mapgen v6 apple trees noise parameters) noise_params 0, 1, [***Mapgen v7] # Map generation attributes specific to Mapgen v7. -# The 'ridges' flag controls the rivers. +# The 'ridges' flag enables the rivers. +# Floatlands are currently experimental and subject to change. # Flags that are not specified in the flag string are not modified from the default. # Flags starting with 'no' are used to explicitly disable them. -mgv7_spflags (Mapgen v7 flags) flags mountains,ridges mountains,ridges,nomountains,noridges +mgv7_spflags (Mapgen v7 flags) flags mountains,ridges mountains,ridges,floatlands,nomountains,noridges,nofloatlands # Controls width of tunnels, a smaller value creates wider tunnels. mgv7_cave_width (Mapgen v7 cave width) float 0.2 +# Controls the density of floatland mountain terrain. +# Is an offset added to the 'np_mountain' noise value. +mgv7_float_mount_density (Mapgen v7 floatland mountain density) float 0.6 + +# Typical maximum height, above and below midpoint, of floatland mountain terrain. +mgv7_float_mount_height (Mapgen v7 floatland mountain height) float 128.0 + +# Y-level of floatland midpoint and lake surface. +mgv7_floatland_level (Mapgen v7 floatland level) int 1280 + +# Y-level to which floatland shadows extend. +mgv7_shadow_limit (Mapgen v7 shadow limit) int 1024 + mgv7_np_terrain_base (Mapgen v7 terrain base noise parameters) noise_params 4, 70, (600, 600, 600), 82341, 5, 0.6, 2.0 mgv7_np_terrain_alt (Mapgen v7 terrain altitude noise parameters) noise_params 4, 25, (600, 600, 600), 5934, 5, 0.6, 2.0 mgv7_np_terrain_persist (Mapgen v7 terrain persistation noise parameters) noise_params 0.6, 0.1, (2000, 2000, 2000), 539, 3, 0.6, 2.0 mgv7_np_height_select (Mapgen v7 height select noise parameters) noise_params -8, 16, (500, 500, 500), 4213, 6, 0.7, 2.0 mgv7_np_filler_depth (Mapgen v7 filler depth noise parameters) noise_params 0, 1.2, (150, 150, 150), 261, 3, 0.7, 2.0 mgv7_np_mount_height (Mapgen v7 mount height noise parameters) noise_params 256, 112, (1000, 1000, 1000), 72449, 3, 0.6, 2.0 -mgv7_np_ridge_uwater (Mapgen v7 ridge water noise parameters) noise_params 0, 1, (1000, 1000, 1000), 85039, 5, 0.6, 2.0 +mgv7_np_ridge_uwater (Mapgen v7 river course noise parameters) noise_params 0, 1, (1000, 1000, 1000), 85039, 5, 0.6, 2.0 +mgv7_np_floatland_base (Mapgen v7 floatland base terrain noise parameters) noise_params -0.6, 1.5, (600, 600, 600), 114, 5, 0.6, 2.0 +mgv7_np_float_base_height (Mapgen v7 floatland base terrain height noise parameters) noise_params 48, 24, (300, 300, 300), 907, 4, 0.7, 2.0 mgv7_np_mountain (Mapgen v7 mountain noise parameters) noise_params -0.6, 1, (250, 350, 250), 5333, 5, 0.63, 2.0 -mgv7_np_ridge (Mapgen v7 ridge noise parameters) noise_params 0, 1, (100, 100, 100), 6467, 4, 0.75, 2.0 +mgv7_np_ridge (Mapgen v7 river channel wall noise parameters) noise_params 0, 1, (100, 100, 100), 6467, 4, 0.75, 2.0 mgv7_np_cave1 (Mapgen v7 cave1 noise parameters) noise_params 0, 12, (61, 61, 61), 52534, 3, 0.5, 2.0 mgv7_np_cave2 (Mapgen v7 cave2 noise parameters) noise_params 0, 12, (67, 67, 67), 10325, 3, 0.5, 2.0 diff --git a/minetest.conf.example b/minetest.conf.example index 02f31779f..361311ba0 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -1239,16 +1239,35 @@ #### Mapgen v7 # Map generation attributes specific to Mapgen v7. -# The 'ridges' flag controls the rivers. +# The 'ridges' flag enables the rivers. +# Floatlands are currently experimental and subject to change. # Flags that are not specified in the flag string are not modified from the default. # Flags starting with 'no' are used to explicitly disable them. -# type: flags possible values: mountains, ridges, nomountains, noridges +# type: flags possible values: mountains, ridges, floatlands, +# nomountains, noridges, nofloatlands # mgv7_spflags = mountains,ridges # Controls width of tunnels, a smaller value creates wider tunnels. # type: float # mgv7_cave_width = 0.2 +# Controls the density of floatland mountain terrain. +# Is an offset added to the 'np_mountain' noise value. +# type: float +# mgv7_float_mount_density = 0.6 + +# Typical maximum height, above and below midpoint, of floatland mountain terrain. +# type: float +# mgv7_float_mount_height = 128.0 + +# Y-level of floatland midpoint and lake surface. +# type: int +# mgv7_floatland_level = 1280 + +# Y-level to which floatland shadows extend. +# type: int +# mgv7_shadow_limit = 1024 + # type: noise_params # mgv7_np_terrain_base = 4, 70, (600, 600, 600), 82341, 5, 0.6, 2.0 @@ -1270,6 +1289,12 @@ # type: noise_params # mgv7_np_ridge_uwater = 0, 1, (1000, 1000, 1000), 85039, 5, 0.6, 2.0 +# type: noise_params +# mgv7_np_floatland_base = -0.6, 1.5, (600, 600, 600), 114, 5, 0.6, 2.0 + +# type: noise_params +# mgv7_np_float_base_height = 48, 24, (300, 300, 300), 907, 4, 0.7, 2.0 + # type: noise_params # mgv7_np_mountain = -0.6, 1, (250, 350, 250), 5333, 5, 0.63, 2.0 diff --git a/src/mapgen_v7.cpp b/src/mapgen_v7.cpp index 86f559af3..c4fa024a8 100644 --- a/src/mapgen_v7.cpp +++ b/src/mapgen_v7.cpp @@ -41,9 +41,10 @@ with this program; if not, write to the Free Software Foundation, Inc., FlagDesc flagdesc_mapgen_v7[] = { - {"mountains", MGV7_MOUNTAINS}, - {"ridges", MGV7_RIDGES}, - {NULL, 0} + {"mountains", MGV7_MOUNTAINS}, + {"ridges", MGV7_RIDGES}, + {"floatlands", MGV7_FLOATLANDS}, + {NULL, 0} }; @@ -53,17 +54,23 @@ FlagDesc flagdesc_mapgen_v7[] = { MapgenV7::MapgenV7(int mapgenid, MapgenV7Params *params, EmergeManager *emerge) : MapgenBasic(mapgenid, params, emerge) { - this->spflags = params->spflags; - this->cave_width = params->cave_width; + this->spflags = params->spflags; + this->cave_width = params->cave_width; + this->float_mount_density = params->float_mount_density; + this->float_mount_height = params->float_mount_height; + this->floatland_level = params->floatland_level; + this->shadow_limit = params->shadow_limit; //// Terrain noise - noise_terrain_base = new Noise(¶ms->np_terrain_base, seed, csize.X, csize.Z); - noise_terrain_alt = new Noise(¶ms->np_terrain_alt, seed, csize.X, csize.Z); - noise_terrain_persist = new Noise(¶ms->np_terrain_persist, seed, csize.X, csize.Z); - noise_height_select = new Noise(¶ms->np_height_select, seed, csize.X, csize.Z); - noise_filler_depth = new Noise(¶ms->np_filler_depth, seed, csize.X, csize.Z); - noise_mount_height = new Noise(¶ms->np_mount_height, seed, csize.X, csize.Z); - noise_ridge_uwater = new Noise(¶ms->np_ridge_uwater, seed, csize.X, csize.Z); + noise_terrain_base = new Noise(¶ms->np_terrain_base, seed, csize.X, csize.Z); + noise_terrain_alt = new Noise(¶ms->np_terrain_alt, seed, csize.X, csize.Z); + noise_terrain_persist = new Noise(¶ms->np_terrain_persist, seed, csize.X, csize.Z); + noise_height_select = new Noise(¶ms->np_height_select, seed, csize.X, csize.Z); + noise_filler_depth = new Noise(¶ms->np_filler_depth, seed, csize.X, csize.Z); + noise_mount_height = new Noise(¶ms->np_mount_height, seed, csize.X, csize.Z); + noise_ridge_uwater = new Noise(¶ms->np_ridge_uwater, seed, csize.X, csize.Z); + noise_floatland_base = new Noise(¶ms->np_floatland_base, seed, csize.X, csize.Z); + noise_float_base_height = new Noise(¶ms->np_float_base_height, seed, csize.X, csize.Z); //// 3d terrain noise // 1-up 1-down overgeneration @@ -84,6 +91,8 @@ MapgenV7::~MapgenV7() delete noise_filler_depth; delete noise_mount_height; delete noise_ridge_uwater; + delete noise_floatland_base; + delete noise_float_base_height; delete noise_mountain; delete noise_ridge; } @@ -91,58 +100,76 @@ MapgenV7::~MapgenV7() MapgenV7Params::MapgenV7Params() { - spflags = MGV7_MOUNTAINS | MGV7_RIDGES; - cave_width = 0.2; - - np_terrain_base = NoiseParams(4, 70, v3f(600, 600, 600), 82341, 5, 0.6, 2.0); - np_terrain_alt = NoiseParams(4, 25, v3f(600, 600, 600), 5934, 5, 0.6, 2.0); - np_terrain_persist = NoiseParams(0.6, 0.1, v3f(2000, 2000, 2000), 539, 3, 0.6, 2.0); - np_height_select = NoiseParams(-8, 16, v3f(500, 500, 500), 4213, 6, 0.7, 2.0); - np_filler_depth = NoiseParams(0, 1.2, v3f(150, 150, 150), 261, 3, 0.7, 2.0); - np_mount_height = NoiseParams(256, 112, v3f(1000, 1000, 1000), 72449, 3, 0.6, 2.0); - np_ridge_uwater = NoiseParams(0, 1, v3f(1000, 1000, 1000), 85039, 5, 0.6, 2.0); - np_mountain = NoiseParams(-0.6, 1, v3f(250, 350, 250), 5333, 5, 0.63, 2.0); - np_ridge = NoiseParams(0, 1, v3f(100, 100, 100), 6467, 4, 0.75, 2.0); - np_cave1 = NoiseParams(0, 12, v3f(61, 61, 61), 52534, 3, 0.5, 2.0); - np_cave2 = NoiseParams(0, 12, v3f(67, 67, 67), 10325, 3, 0.5, 2.0); + spflags = MGV7_MOUNTAINS | MGV7_RIDGES; + cave_width = 0.2; + float_mount_density = 0.6; + float_mount_height = 128.0; + floatland_level = 1280; + shadow_limit = 1024; + + np_terrain_base = NoiseParams(4, 70, v3f(600, 600, 600), 82341, 5, 0.6, 2.0); + np_terrain_alt = NoiseParams(4, 25, v3f(600, 600, 600), 5934, 5, 0.6, 2.0); + np_terrain_persist = NoiseParams(0.6, 0.1, v3f(2000, 2000, 2000), 539, 3, 0.6, 2.0); + np_height_select = NoiseParams(-8, 16, v3f(500, 500, 500), 4213, 6, 0.7, 2.0); + np_filler_depth = NoiseParams(0, 1.2, v3f(150, 150, 150), 261, 3, 0.7, 2.0); + np_mount_height = NoiseParams(256, 112, v3f(1000, 1000, 1000), 72449, 3, 0.6, 2.0); + np_ridge_uwater = NoiseParams(0, 1, v3f(1000, 1000, 1000), 85039, 5, 0.6, 2.0); + np_floatland_base = NoiseParams(-0.6, 1.5, v3f(600, 600, 600), 114, 5, 0.6, 2.0); + np_float_base_height = NoiseParams(48, 24, v3f(300, 300, 300), 907, 4, 0.7, 2.0); + np_mountain = NoiseParams(-0.6, 1, v3f(250, 350, 250), 5333, 5, 0.63, 2.0); + np_ridge = NoiseParams(0, 1, v3f(100, 100, 100), 6467, 4, 0.75, 2.0); + np_cave1 = NoiseParams(0, 12, v3f(61, 61, 61), 52534, 3, 0.5, 2.0); + np_cave2 = NoiseParams(0, 12, v3f(67, 67, 67), 10325, 3, 0.5, 2.0); } void MapgenV7Params::readParams(const Settings *settings) { - settings->getFlagStrNoEx("mgv7_spflags", spflags, flagdesc_mapgen_v7); - settings->getFloatNoEx("mgv7_cave_width", cave_width); - - settings->getNoiseParams("mgv7_np_terrain_base", np_terrain_base); - settings->getNoiseParams("mgv7_np_terrain_alt", np_terrain_alt); - settings->getNoiseParams("mgv7_np_terrain_persist", np_terrain_persist); - settings->getNoiseParams("mgv7_np_height_select", np_height_select); - settings->getNoiseParams("mgv7_np_filler_depth", np_filler_depth); - settings->getNoiseParams("mgv7_np_mount_height", np_mount_height); - settings->getNoiseParams("mgv7_np_ridge_uwater", np_ridge_uwater); - settings->getNoiseParams("mgv7_np_mountain", np_mountain); - settings->getNoiseParams("mgv7_np_ridge", np_ridge); - settings->getNoiseParams("mgv7_np_cave1", np_cave1); - settings->getNoiseParams("mgv7_np_cave2", np_cave2); + settings->getFlagStrNoEx("mgv7_spflags", spflags, flagdesc_mapgen_v7); + settings->getFloatNoEx("mgv7_cave_width", cave_width); + settings->getFloatNoEx("mgv7_float_mount_density", float_mount_density); + settings->getFloatNoEx("mgv7_float_mount_height", float_mount_height); + settings->getS16NoEx("mgv7_floatland_level", floatland_level); + settings->getS16NoEx("mgv7_shadow_limit", shadow_limit); + + settings->getNoiseParams("mgv7_np_terrain_base", np_terrain_base); + settings->getNoiseParams("mgv7_np_terrain_alt", np_terrain_alt); + settings->getNoiseParams("mgv7_np_terrain_persist", np_terrain_persist); + settings->getNoiseParams("mgv7_np_height_select", np_height_select); + settings->getNoiseParams("mgv7_np_filler_depth", np_filler_depth); + settings->getNoiseParams("mgv7_np_mount_height", np_mount_height); + settings->getNoiseParams("mgv7_np_ridge_uwater", np_ridge_uwater); + settings->getNoiseParams("mgv7_np_floatland_base", np_floatland_base); + settings->getNoiseParams("mgv7_np_float_base_height", np_float_base_height); + settings->getNoiseParams("mgv7_np_mountain", np_mountain); + settings->getNoiseParams("mgv7_np_ridge", np_ridge); + settings->getNoiseParams("mgv7_np_cave1", np_cave1); + settings->getNoiseParams("mgv7_np_cave2", np_cave2); } void MapgenV7Params::writeParams(Settings *settings) const { - settings->setFlagStr("mgv7_spflags", spflags, flagdesc_mapgen_v7, U32_MAX); - settings->setFloat("mgv7_cave_width", cave_width); - - settings->setNoiseParams("mgv7_np_terrain_base", np_terrain_base); - settings->setNoiseParams("mgv7_np_terrain_alt", np_terrain_alt); - settings->setNoiseParams("mgv7_np_terrain_persist", np_terrain_persist); - settings->setNoiseParams("mgv7_np_height_select", np_height_select); - settings->setNoiseParams("mgv7_np_filler_depth", np_filler_depth); - settings->setNoiseParams("mgv7_np_mount_height", np_mount_height); - settings->setNoiseParams("mgv7_np_ridge_uwater", np_ridge_uwater); - settings->setNoiseParams("mgv7_np_mountain", np_mountain); - settings->setNoiseParams("mgv7_np_ridge", np_ridge); - settings->setNoiseParams("mgv7_np_cave1", np_cave1); - settings->setNoiseParams("mgv7_np_cave2", np_cave2); + settings->setFlagStr("mgv7_spflags", spflags, flagdesc_mapgen_v7, U32_MAX); + settings->setFloat("mgv7_cave_width", cave_width); + settings->setFloat("mgv7_float_mount_density", float_mount_density); + settings->setFloat("mgv7_float_mount_height", float_mount_height); + settings->setS16("mgv7_floatland_level", floatland_level); + settings->setS16("mgv7_shadow_limit", shadow_limit); + + settings->setNoiseParams("mgv7_np_terrain_base", np_terrain_base); + settings->setNoiseParams("mgv7_np_terrain_alt", np_terrain_alt); + settings->setNoiseParams("mgv7_np_terrain_persist", np_terrain_persist); + settings->setNoiseParams("mgv7_np_height_select", np_height_select); + settings->setNoiseParams("mgv7_np_filler_depth", np_filler_depth); + settings->setNoiseParams("mgv7_np_mount_height", np_mount_height); + settings->setNoiseParams("mgv7_np_ridge_uwater", np_ridge_uwater); + settings->setNoiseParams("mgv7_np_floatland_base", np_floatland_base); + settings->setNoiseParams("mgv7_np_float_base_height", np_float_base_height); + settings->setNoiseParams("mgv7_np_mountain", np_mountain); + settings->setNoiseParams("mgv7_np_ridge", np_ridge); + settings->setNoiseParams("mgv7_np_cave1", np_cave1); + settings->setNoiseParams("mgv7_np_cave2", np_cave2); } @@ -249,9 +276,13 @@ void MapgenV7::makeChunk(BlockMakeData *data) updateLiquid(&data->transforming_liquid, full_node_min, full_node_max); + // Limit floatland shadow + bool propagate_shadow = !((spflags & MGV7_FLOATLANDS) && + node_min.Y <= shadow_limit && node_max.Y >= shadow_limit); + if (flags & MG_LIGHT) calcLighting(node_min - v3s16(0, 1, 0), node_max + v3s16(0, 1, 0), - full_node_min, full_node_max); + full_node_min, full_node_max, propagate_shadow); //setLighting(node_min - v3s16(1, 0, 1) * MAP_BLOCKSIZE, // node_max + v3s16(1, 0, 1) * MAP_BLOCKSIZE, 0xFF); @@ -313,6 +344,47 @@ bool MapgenV7::getMountainTerrainFromMap(int idx_xyz, int idx_xz, s16 y) } +bool MapgenV7::getFloatlandMountainFromMap(int idx_xyz, int idx_xz, s16 y) +{ + float density_gradient = + -pow(fabs((float)(y - floatland_level) / float_mount_height), 0.8f); + float floatn = noise_mountain->result[idx_xyz] + float_mount_density; + + return floatn + density_gradient >= 0.0f; +} + + +void MapgenV7::floatBaseExtentFromMap(s16 *float_base_min, s16 *float_base_max, int idx_xz) +{ + // '+1' to avoid a layer of stone at y = MAX_MAP_GENERATION_LIMIT + s16 base_min = MAX_MAP_GENERATION_LIMIT + 1; + s16 base_max = MAX_MAP_GENERATION_LIMIT; + + float n_base = noise_floatland_base->result[idx_xz]; + if (n_base > 0.0f) { + float n_base_height = + MYMAX(noise_float_base_height->result[idx_xz], 0.0f); + float amp = n_base * n_base_height; + float ridge = n_base_height / 3.0f; + base_min = floatland_level - amp / 2.0f; + + if (amp > ridge * 2.0f) { + // Lake bed + base_max = floatland_level - (amp - ridge * 2.0f) / 2.0f; + } else { + // Hills and ridges + float diff = fabs(amp - ridge) / ridge; + // Smooth ridges using the 'smoothstep function' + float smooth_diff = diff * diff * (3.0f - 2.0f * diff); + base_max = floatland_level + ridge - smooth_diff * ridge; + } + } + + *float_base_min = base_min; + *float_base_max = base_max; +} + + int MapgenV7::generateTerrain() { MapNode n_air(CONTENT_AIR); @@ -327,11 +399,19 @@ int MapgenV7::generateTerrain() noise_terrain_alt->perlinMap2D(node_min.X, node_min.Z, persistmap); noise_height_select->perlinMap2D(node_min.X, node_min.Z); - if (spflags & MGV7_MOUNTAINS) { + if ((spflags & MGV7_MOUNTAINS) || (spflags & MGV7_FLOATLANDS)) { noise_mountain->perlinMap3D(node_min.X, node_min.Y - 1, node_min.Z); + } + + if (spflags & MGV7_MOUNTAINS) { noise_mount_height->perlinMap2D(node_min.X, node_min.Z); } + if (spflags & MGV7_FLOATLANDS) { + noise_floatland_base->perlinMap2D(node_min.X, node_min.Z); + noise_float_base_height->perlinMap2D(node_min.X, node_min.Z); + } + //// Place nodes v3s16 em = vm->m_area.getExtent(); s16 stone_surface_max_y = -MAX_MAP_GENERATION_LIMIT; @@ -340,10 +420,16 @@ int MapgenV7::generateTerrain() for (s16 z = node_min.Z; z <= node_max.Z; z++) for (s16 x = node_min.X; x <= node_max.X; x++, index2d++) { s16 surface_y = baseTerrainLevelFromMap(index2d); - if (surface_y > stone_surface_max_y) stone_surface_max_y = surface_y; + // Get extent of floatland base terrain + // '+1' to avoid a layer of stone at y = MAX_MAP_GENERATION_LIMIT + s16 float_base_min = MAX_MAP_GENERATION_LIMIT + 1; + s16 float_base_max = MAX_MAP_GENERATION_LIMIT; + if (spflags & MGV7_FLOATLANDS) + floatBaseExtentFromMap(&float_base_min, &float_base_max, index2d); + u32 vi = vm->m_area.index(x, node_min.Y - 1, z); u32 index3d = (z - node_min.Z) * zstride_1u1d + (x - node_min.X); @@ -356,8 +442,16 @@ int MapgenV7::generateTerrain() vm->m_data[vi] = n_stone; // Mountain terrain if (y > stone_surface_max_y) stone_surface_max_y = y; + } else if ((spflags & MGV7_FLOATLANDS) && + ((y >= float_base_min && y <= float_base_max) || + getFloatlandMountainFromMap(index3d, index2d, y))) { + vm->m_data[vi] = n_stone; // Floatland terrain + stone_surface_max_y = node_max.Y; } else if (y <= water_level) { - vm->m_data[vi] = n_water; + vm->m_data[vi] = n_water; // Ground level water + } else if ((spflags & MGV7_FLOATLANDS) && + (y >= float_base_max && y <= floatland_level)) { + vm->m_data[vi] = n_water; // Floatland water } else { vm->m_data[vi] = n_air; } @@ -373,7 +467,7 @@ int MapgenV7::generateTerrain() void MapgenV7::generateRidgeTerrain() { - if (node_max.Y < water_level - 16) + if ((node_max.Y < water_level - 16) || (node_max.Y > shadow_limit)) return; noise_ridge->perlinMap3D(node_min.X, node_min.Y - 1, node_min.Z); diff --git a/src/mapgen_v7.h b/src/mapgen_v7.h index 3a6bc0801..3972387a7 100644 --- a/src/mapgen_v7.h +++ b/src/mapgen_v7.h @@ -23,9 +23,10 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "mapgen.h" -/////////////////// Mapgen V7 flags -#define MGV7_MOUNTAINS 0x01 -#define MGV7_RIDGES 0x02 +////////////// Mapgen V7 flags +#define MGV7_MOUNTAINS 0x01 +#define MGV7_RIDGES 0x02 +#define MGV7_FLOATLANDS 0x04 class BiomeManager; @@ -35,6 +36,11 @@ extern FlagDesc flagdesc_mapgen_v7[]; struct MapgenV7Params : public MapgenParams { u32 spflags; float cave_width; + float float_mount_density; + float float_mount_height; + s16 floatland_level; + s16 shadow_limit; + NoiseParams np_terrain_base; NoiseParams np_terrain_alt; NoiseParams np_terrain_persist; @@ -42,6 +48,8 @@ struct MapgenV7Params : public MapgenParams { NoiseParams np_filler_depth; NoiseParams np_mount_height; NoiseParams np_ridge_uwater; + NoiseParams np_floatland_base; + NoiseParams np_float_base_height; NoiseParams np_mountain; NoiseParams np_ridge; NoiseParams np_cave1; @@ -68,16 +76,26 @@ public: float baseTerrainLevelFromMap(int index); bool getMountainTerrainAtPoint(s16 x, s16 y, s16 z); bool getMountainTerrainFromMap(int idx_xyz, int idx_xz, s16 y); + bool getFloatlandMountainFromMap(int idx_xyz, int idx_xz, s16 y); + void floatBaseExtentFromMap(s16 *float_base_min, s16 *float_base_max, int idx_xz); + int generateTerrain(); void generateRidgeTerrain(); private: + float float_mount_density; + float float_mount_height; + s16 floatland_level; + s16 shadow_limit; + Noise *noise_terrain_base; Noise *noise_terrain_alt; Noise *noise_terrain_persist; Noise *noise_height_select; Noise *noise_mount_height; Noise *noise_ridge_uwater; + Noise *noise_floatland_base; + Noise *noise_float_base_height; Noise *noise_mountain; Noise *noise_ridge; }; -- cgit v1.2.3 From 075833e39368e63e06889f21140f816420e83541 Mon Sep 17 00:00:00 2001 From: Lars Hofhansl Date: Sat, 3 Dec 2016 21:43:25 -0800 Subject: Fog: Make fraction of visible distance at which fog starts configurable Optimise the fetching of global settings 'camera_smoothing', 'cinematic' and 'cinematic_camera_smoothing'. Cache 'cam_smoothing'. --- builtin/settingtypes.txt | 3 ++ client/shaders/nodes_shader/opengl_fragment.glsl | 2 +- .../water_surface_shader/opengl_fragment.glsl | 2 +- client/shaders/wielded_shader/opengl_fragment.glsl | 2 +- minetest.conf.example | 4 +++ src/defaultsettings.cpp | 1 + src/game.cpp | 37 ++++++++++++++++------ src/shader.cpp | 4 +++ 8 files changed, 43 insertions(+), 12 deletions(-) (limited to 'minetest.conf.example') diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index b1f31054e..10db4787d 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -529,6 +529,9 @@ ambient_occlusion_gamma (Ambient occlusion gamma) float 2.2 0.25 4.0 # Enables animation of inventory items. inventory_items_animations (Inventory items animations) bool false +# Fraction of the visible distance at which fog starts to be rendered +fog_start (Fog Start) float 0.4 0.0 0.99 + [**Menus] # Use a cloud animation for the main menu background. diff --git a/client/shaders/nodes_shader/opengl_fragment.glsl b/client/shaders/nodes_shader/opengl_fragment.glsl index 149aa2bc5..71ded2b9d 100644 --- a/client/shaders/nodes_shader/opengl_fragment.glsl +++ b/client/shaders/nodes_shader/opengl_fragment.glsl @@ -19,7 +19,7 @@ bool normalTexturePresent = false; const float e = 2.718281828459; const float BS = 10.0; -const float fogStart = 0.4; +const float fogStart = FOG_START; const float fogShadingParameter = 1 / ( 1 - fogStart); #ifdef ENABLE_TONE_MAPPING diff --git a/client/shaders/water_surface_shader/opengl_fragment.glsl b/client/shaders/water_surface_shader/opengl_fragment.glsl index 4164870c7..c4e78470d 100644 --- a/client/shaders/water_surface_shader/opengl_fragment.glsl +++ b/client/shaders/water_surface_shader/opengl_fragment.glsl @@ -21,7 +21,7 @@ bool texSeamless = false; const float e = 2.718281828459; const float BS = 10.0; -const float fogStart = 0.4; +const float fogStart = FOG_START; const float fogShadingParameter = 1 / ( 1 - fogStart); #ifdef ENABLE_TONE_MAPPING diff --git a/client/shaders/wielded_shader/opengl_fragment.glsl b/client/shaders/wielded_shader/opengl_fragment.glsl index 7c38b749a..ba7a8f12d 100644 --- a/client/shaders/wielded_shader/opengl_fragment.glsl +++ b/client/shaders/wielded_shader/opengl_fragment.glsl @@ -19,7 +19,7 @@ bool texSeamless = false; const float e = 2.718281828459; const float BS = 10.0; -const float fogStart = 0.4; +const float fogStart = FOG_START; const float fogShadingParameter = 1 / ( 1 - fogStart); void get_texture_flags() diff --git a/minetest.conf.example b/minetest.conf.example index 361311ba0..90d7af0a3 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -615,6 +615,10 @@ # type: bool # inventory_items_animations = false +# Fraction of the visible distance at which fog starts to be rendered +# Range 0 - 0.99 +# fog_start = 0.4 + ### Menus # Use a cloud animation for the main menu background. diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 2cb57532d..bd88cf530 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -106,6 +106,7 @@ void set_default_settings(Settings *settings) settings->setDefault("client_unload_unused_data_timeout", "600"); settings->setDefault("client_mapblock_limit", "5000"); settings->setDefault("enable_fog", "true"); + settings->setDefault("fog_start", "0.4"); settings->setDefault("fov", "72"); settings->setDefault("view_bobbing", "true"); settings->setDefault("leaves_style", "fancy"); diff --git a/src/game.cpp b/src/game.cpp index e6d38d0a0..cc6e5a0e3 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1825,6 +1825,8 @@ private: f32 m_cache_mouse_sensitivity; f32 m_cache_joystick_frustum_sensitivity; f32 m_repeat_right_click_time; + f32 m_cache_cam_smoothing; + f32 m_cache_fog_start; #ifdef __ANDROID__ bool m_cache_hold_aux1; @@ -1876,6 +1878,12 @@ Game::Game() : &settingChangedCallback, this); g_settings->registerChangedCallback("free_move", &settingChangedCallback, this); + g_settings->registerChangedCallback("cinematic", + &settingChangedCallback, this); + g_settings->registerChangedCallback("cinematic_camera_smoothing", + &settingChangedCallback, this); + g_settings->registerChangedCallback("camera_smoothing", + &settingChangedCallback, this); readSettings(); @@ -1929,6 +1937,12 @@ Game::~Game() &settingChangedCallback, this); g_settings->deregisterChangedCallback("free_move", &settingChangedCallback, this); + g_settings->deregisterChangedCallback("cinematic", + &settingChangedCallback, this); + g_settings->deregisterChangedCallback("cinematic_camera_smoothing", + &settingChangedCallback, this); + g_settings->deregisterChangedCallback("camera_smoothing", + &settingChangedCallback, this); } bool Game::startup(bool *kill, @@ -2034,16 +2048,10 @@ void Game::run() processUserInput(&flags, &runData, dtime); // Update camera before player movement to avoid camera lag of one frame updateCameraDirection(&cam_view_target, &flags, dtime); - float cam_smoothing = 0; - if (g_settings->getBool("cinematic")) - cam_smoothing = 1 - g_settings->getFloat("cinematic_camera_smoothing"); - else - cam_smoothing = 1 - g_settings->getFloat("camera_smoothing"); - cam_smoothing = rangelim(cam_smoothing, 0.01f, 1.0f); cam_view.camera_yaw += (cam_view_target.camera_yaw - - cam_view.camera_yaw) * cam_smoothing; + cam_view.camera_yaw) * m_cache_cam_smoothing; cam_view.camera_pitch += (cam_view_target.camera_pitch - - cam_view.camera_pitch) * cam_smoothing; + cam_view.camera_pitch) * m_cache_cam_smoothing; updatePlayerControl(cam_view); step(&dtime); processClientEvents(&cam_view_target, &runData.damage_flash); @@ -4284,7 +4292,7 @@ void Game::updateFrame(ProfilerGraph *graph, RunStats *stats, driver->setFog( sky->getBgColor(), video::EFT_FOG_LINEAR, - runData->fog_range * 0.4, + runData->fog_range * m_cache_fog_start, runData->fog_range * 1.0, 0.01, false, // pixel fog @@ -4660,7 +4668,18 @@ void Game::readSettings() m_cache_enable_noclip = g_settings->getBool("noclip"); m_cache_enable_free_move = g_settings->getBool("free_move"); + m_cache_fog_start = g_settings->getFloat("fog_start"); + + m_cache_cam_smoothing = 0; + if (g_settings->getBool("cinematic")) + m_cache_cam_smoothing = 1 - g_settings->getFloat("cinematic_camera_smoothing"); + else + m_cache_cam_smoothing = 1 - g_settings->getFloat("camera_smoothing"); + + m_cache_fog_start = rangelim(m_cache_fog_start, 0.0f, 0.99f); + m_cache_cam_smoothing = rangelim(m_cache_cam_smoothing, 0.01f, 1.0f); m_cache_mouse_sensitivity = rangelim(m_cache_mouse_sensitivity, 0.001, 100.0); + } /****************************************************************************/ diff --git a/src/shader.cpp b/src/shader.cpp index d51c1e308..c0ecf738d 100644 --- a/src/shader.cpp +++ b/src/shader.cpp @@ -751,6 +751,10 @@ ShaderInfo generate_shader(std::string name, u8 material_type, u8 drawtype, if (g_settings->getBool("tone_mapping")) shaders_header += "#define ENABLE_TONE_MAPPING\n"; + shaders_header += "#define FOG_START "; + shaders_header += ftos(rangelim(g_settings->getFloat("fog_start"), 0.0f, 0.99f)); + shaders_header += "\n"; + // Call addHighLevelShaderMaterial() or addShaderMaterial() const c8* vertex_program_ptr = 0; const c8* pixel_program_ptr = 0; -- cgit v1.2.3 From 02112f84e2102182816ffa48d5444a7321730936 Mon Sep 17 00:00:00 2001 From: Rogier Date: Sun, 11 Dec 2016 00:23:32 +0100 Subject: View range: Set maximum to 4000 nodes The network protocol does not support larger than 255 mapblocks. --- builtin/settingtypes.txt | 3 +-- minetest.conf.example | 3 +-- src/client.cpp | 3 ++- src/game.cpp | 22 ++++++++++++++++------ 4 files changed, 20 insertions(+), 11 deletions(-) (limited to 'minetest.conf.example') diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index 10db4787d..822568af4 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -418,8 +418,7 @@ fps_max (Maximum FPS) int 60 pause_fps_max (FPS in pause menu) int 20 # View distance in nodes. -# Min = 20 -viewing_range (Viewing range) int 100 +viewing_range (Viewing range) int 100 20 4000 # Width component of the initial window size. screenW (Screen width) int 800 diff --git a/minetest.conf.example b/minetest.conf.example index 90d7af0a3..f0e5f1d47 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -473,8 +473,7 @@ # pause_fps_max = 20 # View distance in nodes. -# Min = 20 -# type: int +# type: int min: 20 max: 4000 # viewing_range = 100 # Width component of the initial window size. diff --git a/src/client.cpp b/src/client.cpp index 7e88e5562..5476aad0e 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -940,7 +940,8 @@ void writePlayerPos(LocalPlayer *myplayer, ClientMap *clientMap, NetworkPacket * u32 keyPressed = myplayer->keyPressed; // scaled by 80, so that pi can fit into a u8 u8 fov = clientMap->getCameraFov() * 80; - u8 wanted_range = std::ceil(clientMap->getControl().wanted_range / MAP_BLOCKSIZE); + u8 wanted_range = MYMIN(255, + std::ceil(clientMap->getControl().wanted_range / MAP_BLOCKSIZE)); v3s32 position(pf.X, pf.Y, pf.Z); v3s32 speed(sf.X, sf.Y, sf.Z); diff --git a/src/game.cpp b/src/game.cpp index 18b28c142..ea07accf8 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -3277,9 +3277,16 @@ void Game::increaseViewRange(float *statustext_time) { s16 range = g_settings->getS16("viewing_range"); s16 range_new = range + 10; + + if (range_new > 4000) { + range_new = 4000; + statustext = utf8_to_wide("Viewing range is at maximum: " + + itos(range_new)); + } else { + statustext = utf8_to_wide("Viewing range changed to " + + itos(range_new)); + } g_settings->set("viewing_range", itos(range_new)); - statustext = utf8_to_wide("Viewing range changed to " - + itos(range_new)); *statustext_time = 0; } @@ -3289,12 +3296,15 @@ void Game::decreaseViewRange(float *statustext_time) s16 range = g_settings->getS16("viewing_range"); s16 range_new = range - 10; - if (range_new < 20) + if (range_new < 20) { range_new = 20; - + statustext = utf8_to_wide("Viewing range is at minimum: " + + itos(range_new)); + } else { + statustext = utf8_to_wide("Viewing range changed to " + + itos(range_new)); + } g_settings->set("viewing_range", itos(range_new)); - statustext = utf8_to_wide("Viewing range changed to " - + itos(range_new)); *statustext_time = 0; } -- cgit v1.2.3 From 0d94bfabcc71efac20210746430a2b9e401425b1 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 12 Dec 2016 17:10:16 +0100 Subject: Mgv7: Change default cave width to 0.09 --- builtin/settingtypes.txt | 2 +- minetest.conf.example | 2 +- src/mapgen_v7.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'minetest.conf.example') diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index 822568af4..df4484750 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -972,7 +972,7 @@ mgv6_np_apple_trees (Mapgen v6 apple trees noise parameters) noise_params 0, 1, mgv7_spflags (Mapgen v7 flags) flags mountains,ridges mountains,ridges,floatlands,nomountains,noridges,nofloatlands # Controls width of tunnels, a smaller value creates wider tunnels. -mgv7_cave_width (Mapgen v7 cave width) float 0.2 +mgv7_cave_width (Mapgen v7 cave width) float 0.09 # Controls the density of floatland mountain terrain. # Is an offset added to the 'np_mountain' noise value. diff --git a/minetest.conf.example b/minetest.conf.example index f0e5f1d47..e372e5833 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -1252,7 +1252,7 @@ # Controls width of tunnels, a smaller value creates wider tunnels. # type: float -# mgv7_cave_width = 0.2 +# mgv7_cave_width = 0.09 # Controls the density of floatland mountain terrain. # Is an offset added to the 'np_mountain' noise value. diff --git a/src/mapgen_v7.cpp b/src/mapgen_v7.cpp index 498a1333c..04a9e3c16 100644 --- a/src/mapgen_v7.cpp +++ b/src/mapgen_v7.cpp @@ -101,7 +101,7 @@ MapgenV7::~MapgenV7() MapgenV7Params::MapgenV7Params() { spflags = MGV7_MOUNTAINS | MGV7_RIDGES; - cave_width = 0.2; + cave_width = 0.09; float_mount_density = 0.6; float_mount_height = 128.0; floatland_level = 1280; -- cgit v1.2.3 From 211d919b546e25e798982dd8df24ec82ecee2d6b Mon Sep 17 00:00:00 2001 From: est31 Date: Wed, 14 Dec 2016 00:15:11 +0100 Subject: Update minetest.conf.example and settings_translation_file.cpp --- minetest.conf.example | 35 +++++++++++------------------------ src/settings_translation_file.cpp | 22 ++++++++++++++++++---- 2 files changed, 29 insertions(+), 28 deletions(-) (limited to 'minetest.conf.example') diff --git a/minetest.conf.example b/minetest.conf.example index e372e5833..bdd28cda6 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -615,7 +615,7 @@ # inventory_items_animations = false # Fraction of the visible distance at which fog starts to be rendered -# Range 0 - 0.99 +# type: float min: 0 max: 0.99 # fog_start = 0.4 ### Menus @@ -936,26 +936,6 @@ # type: float # server_map_save_interval = 5.3 -# Set the maximum character length of a chat message sent by clients. (0 to disable) -# type: integer -# chat_message_max_size = 500 - -# Limit a single player to send X messages per 10 seconds. (0 to disable) -# type: float -# chat_message_limit_per_10sec = 8.0 - -# Kick player if send more than X messages per 10 seconds. (0 to disable) -# type: integer -# chat_message_limit_trigger_kick = 50 - -# At this distance the server will aggressively optimize which blocks are sent to clients. -# Small values potentially improve performance a lot, at the expense of visible rendering glitches. -# (some blocks will not be rendered under water and in caves, as well as sometimes on land) -# Setting this to a value greater than max_block_send_distance disables this optimization. -# Stated in mapblocks (16 nodes) -# type: int -# block_send_optimize_distance = 4 - ### Physics # type: float @@ -1060,6 +1040,14 @@ # type: float # liquid_update = 1.0 +# At this distance the server will aggressively optimize which blocks are sent to clients. +# Small values potentially improve performance a lot, at the expense of visible rendering glitches. +# (some blocks will not be rendered under water and in caves, as well as sometimes on land) +# Setting this to a value greater than max_block_send_distance disables this optimization. +# Stated in mapblocks (16 nodes) +# type: int min: 2 +# block_send_optimize_distance = 4 + ## Mapgen # Name of map generator to be used when creating a new world. @@ -1246,8 +1234,7 @@ # Floatlands are currently experimental and subject to change. # Flags that are not specified in the flag string are not modified from the default. # Flags starting with 'no' are used to explicitly disable them. -# type: flags possible values: mountains, ridges, floatlands, -# nomountains, noridges, nofloatlands +# type: flags possible values: mountains, ridges, floatlands, nomountains, noridges, nofloatlands # mgv7_spflags = mountains,ridges # Controls width of tunnels, a smaller value creates wider tunnels. @@ -1571,7 +1558,7 @@ # profiler.default_report_format = txt # The file path relative to your worldpath in which profiles will be saved to. -# +# # type: string # profiler.report_path = "" diff --git a/src/settings_translation_file.cpp b/src/settings_translation_file.cpp index bebada2f8..39223d9ce 100644 --- a/src/settings_translation_file.cpp +++ b/src/settings_translation_file.cpp @@ -196,7 +196,7 @@ fake_function() { gettext("FPS in pause menu"); gettext("Maximum FPS when game is paused."); gettext("Viewing range"); - gettext("View distance in nodes.\nMin = 20"); + gettext("View distance in nodes."); gettext("Screen width"); gettext("Width component of the initial window size."); gettext("Screen height"); @@ -257,6 +257,8 @@ fake_function() { gettext("The strength (darkness) of node ambient-occlusion shading.\nLower is darker, Higher is lighter. The valid range of values for this\nsetting is 0.25 to 4.0 inclusive. If the value is out of range it will be\nset to the nearest valid value."); gettext("Inventory items animations"); gettext("Enables animation of inventory items."); + gettext("Fog Start"); + gettext("Fraction of the visible distance at which fog starts to be rendered"); gettext("Menus"); gettext("Clouds in menu"); gettext("Use a cloud animation for the main menu background."); @@ -434,6 +436,8 @@ fake_function() { gettext("The time (in seconds) that the liquids queue may grow beyond processing\ncapacity until an attempt is made to decrease its size by dumping old queue\nitems. A value of 0 disables the functionality."); gettext("Liquid update tick"); gettext("Liquid update interval in seconds."); + gettext("block send optimize distance"); + gettext("At this distance the server will aggressively optimize which blocks are sent to clients.\nSmall values potentially improve performance a lot, at the expense of visible rendering glitches.\n(some blocks will not be rendered under water and in caves, as well as sometimes on land)\nSetting this to a value greater than max_block_send_distance disables this optimization.\nStated in mapblocks (16 nodes)"); gettext("Mapgen"); gettext("Mapgen name"); gettext("Name of map generator to be used when creating a new world.\nCreating a world in the main menu will override this."); @@ -490,18 +494,28 @@ fake_function() { gettext("Mapgen v6 apple trees noise parameters"); gettext("Mapgen v7"); gettext("Mapgen v7 flags"); - gettext("Map generation attributes specific to Mapgen v7.\nThe 'ridges' flag controls the rivers.\nFlags that are not specified in the flag string are not modified from the default.\nFlags starting with 'no' are used to explicitly disable them."); + gettext("Map generation attributes specific to Mapgen v7.\nThe 'ridges' flag enables the rivers.\nFloatlands are currently experimental and subject to change.\nFlags that are not specified in the flag string are not modified from the default.\nFlags starting with 'no' are used to explicitly disable them."); gettext("Mapgen v7 cave width"); gettext("Controls width of tunnels, a smaller value creates wider tunnels."); + gettext("Mapgen v7 floatland mountain density"); + gettext("Controls the density of floatland mountain terrain.\nIs an offset added to the 'np_mountain' noise value."); + gettext("Mapgen v7 floatland mountain height"); + gettext("Typical maximum height, above and below midpoint, of floatland mountain terrain."); + gettext("Mapgen v7 floatland level"); + gettext("Y-level of floatland midpoint and lake surface."); + gettext("Mapgen v7 shadow limit"); + gettext("Y-level to which floatland shadows extend."); gettext("Mapgen v7 terrain base noise parameters"); gettext("Mapgen v7 terrain altitude noise parameters"); gettext("Mapgen v7 terrain persistation noise parameters"); gettext("Mapgen v7 height select noise parameters"); gettext("Mapgen v7 filler depth noise parameters"); gettext("Mapgen v7 mount height noise parameters"); - gettext("Mapgen v7 ridge water noise parameters"); + gettext("Mapgen v7 river course noise parameters"); + gettext("Mapgen v7 floatland base terrain noise parameters"); + gettext("Mapgen v7 floatland base terrain height noise parameters"); gettext("Mapgen v7 mountain noise parameters"); - gettext("Mapgen v7 ridge noise parameters"); + gettext("Mapgen v7 river channel wall noise parameters"); gettext("Mapgen v7 cave1 noise parameters"); gettext("Mapgen v7 cave2 noise parameters"); gettext("Mapgen flat"); -- cgit v1.2.3 From f8408398f56b19ea277cb5921f0843ba06002574 Mon Sep 17 00:00:00 2001 From: paramat Date: Tue, 13 Dec 2016 04:08:23 +0000 Subject: Cavegen: Wider tunnels in mgflat, mgfractal, mgvalleys As mgv7 is now the default mapgen i re-checked its tunnel width on request, discovered they needed to be wider, and have made this change. This commit widens the identical 3D noise tunnels in the other mapgens in exactly the same way. --- builtin/settingtypes.txt | 6 +++--- minetest.conf.example | 6 +++--- src/mapgen_flat.cpp | 2 +- src/mapgen_fractal.cpp | 2 +- src/mapgen_valleys.cpp | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'minetest.conf.example') diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index df4484750..ea0ca9992 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -1016,7 +1016,7 @@ mgflat_ground_level (Mapgen flat ground level) int 8 mgflat_large_cave_depth (Mapgen flat large cave depth) int -33 # Controls width of tunnels, a smaller value creates wider tunnels. -mgflat_cave_width (Mapgen flat cave width) float 0.2 +mgflat_cave_width (Mapgen flat cave width) float 0.09 # Terrain noise threshold for lakes. # Controls proportion of world area covered by lakes. @@ -1046,7 +1046,7 @@ mgflat_np_cave2 (Mapgen flat cave2 noise parameters) noise_params 0, 12, (67, 67 [***Mapgen fractal] # Controls width of tunnels, a smaller value creates wider tunnels. -mgfractal_cave_width (Mapgen fractal cave width) float 0.2 +mgfractal_cave_width (Mapgen fractal cave width) float 0.09 # Choice of 18 fractals from 9 formulas. # 1 = 4D "Roundy" mandelbrot set. @@ -1148,7 +1148,7 @@ mgvalleys_river_size (River Size) int 5 mgvalleys_water_features (Water Features) int 0 # Controls width of tunnels, a smaller value creates wider tunnels. -mgvalleys_cave_width (Cave width) float 0.2 +mgvalleys_cave_width (Cave width) float 0.09 # Noise parameters [****Noises] diff --git a/minetest.conf.example b/minetest.conf.example index bdd28cda6..ff365466f 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -1316,7 +1316,7 @@ # Controls width of tunnels, a smaller value creates wider tunnels. # type: float -# mgflat_cave_width = 0.2 +# mgflat_cave_width = 0.09 # Terrain noise threshold for lakes. # Controls proportion of world area covered by lakes. @@ -1357,7 +1357,7 @@ # Controls width of tunnels, a smaller value creates wider tunnels. # type: float -# mgfractal_cave_width = 0.2 +# mgfractal_cave_width = 0.09 # Choice of 18 fractals from 9 formulas. # 1 = 4D "Roundy" mandelbrot set. @@ -1482,7 +1482,7 @@ # Controls width of tunnels, a smaller value creates wider tunnels. # type: float -# mgvalleys_cave_width = 0.2 +# mgvalleys_cave_width = 0.09 ##### Noises diff --git a/src/mapgen_flat.cpp b/src/mapgen_flat.cpp index 2c1715e61..cc120b580 100644 --- a/src/mapgen_flat.cpp +++ b/src/mapgen_flat.cpp @@ -82,7 +82,7 @@ MapgenFlatParams::MapgenFlatParams() spflags = 0; ground_level = 8; large_cave_depth = -33; - cave_width = 0.2; + cave_width = 0.09; lake_threshold = -0.45; lake_steepness = 48.0; hill_threshold = 0.45; diff --git a/src/mapgen_fractal.cpp b/src/mapgen_fractal.cpp index 0951a0afa..a6ed18ae7 100644 --- a/src/mapgen_fractal.cpp +++ b/src/mapgen_fractal.cpp @@ -84,7 +84,7 @@ MapgenFractal::~MapgenFractal() MapgenFractalParams::MapgenFractalParams() { spflags = 0; - cave_width = 0.2; + cave_width = 0.09; fractal = 1; iterations = 11; scale = v3f(4096.0, 1024.0, 4096.0); diff --git a/src/mapgen_valleys.cpp b/src/mapgen_valleys.cpp index 456e6aa1a..ce7a95329 100644 --- a/src/mapgen_valleys.cpp +++ b/src/mapgen_valleys.cpp @@ -143,7 +143,7 @@ MapgenValleysParams::MapgenValleysParams() river_depth = 4; // How deep to carve river channels. river_size = 5; // How wide to make rivers. water_features = 0; // How often water will occur in caves. - cave_width = 0.2; + cave_width = 0.09; np_cave1 = NoiseParams(0, 12, v3f(61, 61, 61), 52534, 3, 0.5, 2.0); np_cave2 = NoiseParams(0, 12, v3f(67, 67, 67), 10325, 3, 0.5, 2.0); -- cgit v1.2.3 From 78bf7c46e5fe8845e9a9f65b98db32b0ff398ad3 Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Thu, 15 Dec 2016 20:55:41 -0800 Subject: Mapgen: Make mgv7 the default in UI The actual menu default comes from defaultsettings.cpp. --- builtin/settingtypes.txt | 2 +- minetest.conf.example | 2 +- src/defaultsettings.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'minetest.conf.example') diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index ea0ca9992..f0ddd5bc0 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -862,7 +862,7 @@ block_send_optimize_distance (block send optimize distance) int 4 2 # Name of map generator to be used when creating a new world. # Creating a world in the main menu will override this. -mg_name (Mapgen name) enum v6 v5,v6,v7,flat,valleys,fractal,singlenode +mg_name (Mapgen name) enum v7 v5,v6,v7,flat,valleys,fractal,singlenode # Water surface level of the world. water_level (Water level) int 1 diff --git a/minetest.conf.example b/minetest.conf.example index ff365466f..6c7d1e66b 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -1053,7 +1053,7 @@ # Name of map generator to be used when creating a new world. # Creating a world in the main menu will override this. # type: enum values: v5, v6, v7, flat, valleys, fractal, singlenode -# mg_name = v6 +# mg_name = v7 # Water surface level of the world. # type: int diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index bd88cf530..60a34cf63 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -327,7 +327,7 @@ void set_default_settings(Settings *settings) settings->setDefault("liquid_update", "1.0"); //mapgen stuff - settings->setDefault("mg_name", "v6"); + settings->setDefault("mg_name", "v7"); settings->setDefault("water_level", "1"); settings->setDefault("chunksize", "5"); settings->setDefault("mg_flags", "dungeons"); -- cgit v1.2.3 From 09f1a0c1ff8b5d73443603d85fccc3eb25cf4650 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Wed, 21 Dec 2016 14:04:46 +0100 Subject: Disable mod security by default (closes #4944) --- builtin/settingtypes.txt | 2 +- minetest.conf.example | 2 +- src/defaultsettings.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'minetest.conf.example') diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index f0ddd5bc0..1818b5a18 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -1186,7 +1186,7 @@ mgvalleys_np_inter_valley_slope (Valley Slope) noise_params 0.5, 0.5, (128, 128, [*Security] # Prevent mods from doing insecure things like running shell commands. -secure.enable_security (Enable mod security) bool true +secure.enable_security (Enable mod security) bool false # Comma-separated list of trusted mods that are allowed to access insecure # functions even when mod security is on (via request_insecure_environment()). diff --git a/minetest.conf.example b/minetest.conf.example index 6c7d1e66b..867d98584 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -1530,7 +1530,7 @@ # Prevent mods from doing insecure things like running shell commands. # type: bool -# secure.enable_security = true +# secure.enable_security = false # Comma-separated list of trusted mods that are allowed to access insecure # functions even when mod security is on (via request_insecure_environment()). diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 60a34cf63..0b4be6322 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -303,7 +303,7 @@ void set_default_settings(Settings *settings) settings->setDefault("emergequeue_limit_diskonly", "32"); settings->setDefault("emergequeue_limit_generate", "32"); settings->setDefault("num_emerge_threads", "1"); - settings->setDefault("secure.enable_security", "true"); + settings->setDefault("secure.enable_security", "false"); settings->setDefault("secure.trusted_mods", ""); settings->setDefault("secure.http_mods", ""); -- cgit v1.2.3