Commit Graph

3195 Commits

Author SHA1 Message Date
kwolekr
b67f37f27e Redefine NodeResolver interface and replace with callback mechanism 2014-12-27 02:12:21 -05:00
ShadowNinja
33eed6eb84 Fix fs::GetRecursiveSubPaths trying to get directory lists for files 2014-12-24 17:23:07 -05:00
Craig Robbins
8621e6de5d Large increase in performance 2014-12-24 23:13:24 +10:00
kwolekr
565959db86 Silence misc. warnings 2014-12-23 01:09:50 -05:00
Craig Robbins
7b93408884 Make limiting of the reflow liquids queue size optional
If liquid_queue_purge_time == 0 then disable the queue size limiting and make this the default setting
Additionally, liquid_loop_max now defaults to 100000
2014-12-23 15:47:06 +10:00
kwolekr
249749dd8c Temporarily fix always bright wieldhand with shaders enabled 2014-12-22 22:37:11 -05:00
Kahrl
7109e8f9fd Fix weird (and wrong) comment in test.cpp 2014-12-21 13:20:42 +01:00
paramat
173e1f6014 Re-add hacky fix for underwater grass, to fix mgv7 user's biomes 2014-12-20 14:50:13 -05:00
unknown
1e8e700ee6 Change TileSpec::frames to be std::vector not std::map
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-12-21 02:41:17 +10:00
Vanessa Ezekowitz
0d55f43977 Fix visual_scale for plantlike nodes (again)
fixes #1989

move the plant to the bottom of its node properly, without affecting its scale.  See isue #1989
2014-12-19 12:25:32 +10:00
Craig Robbins
815876e709 Fix visual_scale for NDT_PLANTLIKE being set too small 2014-12-18 20:28:14 +10:00
Craig Robbins
f5211bbd59 Suppress compiler warning 2014-12-18 19:29:04 +10:00
kwolekr
67063ed59f Remove manual biome noise translation 2014-12-17 16:28:28 -05:00
Craig Robbins
082256a9f8 Do not allow the m_transforming_liquid queue to increase until all RAM is consumed 2014-12-18 03:32:19 +10:00
Pavel Puchkin
3b902fd574 Fix OSX packaging finally
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-12-16 20:33:54 +10:00
kwolekr
8661b3587b Set WM_CLASS window hint for Xorg 2014-12-15 13:52:10 -05:00
kwolekr
8fe1d3fc2e Expose mapgen chunksize in on_mapgen_init callbacks 2014-12-14 18:46:46 -05:00
Pavel Puchkin
a0ac471c1a Fixes #1687 by extra semaphore retval handle code for OSX
See https://github.com/minetest/minetest/issues/1687#issuecomment-56830173

Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-12-15 02:12:39 +10:00
kwolekr
dcbf1b3ce5 Noise: Don't assume Noise is used for 2D unless gradientMap2D is actually called 2014-12-14 00:18:31 -05:00
Craig Robbins
b5e11e0e9a Fix misleading error when exiting the client from the main menu 2014-12-14 00:07:44 +10:00
Craig Robbins
784a452ed5 Provide more info if a subgame is not valid/found 2014-12-13 23:01:16 +10:00
kwolekr
035e6bfc18 LuaPerlinNoiseMap: Fix 3d noise safety check 2014-12-12 22:58:44 -05:00
Kahrl
c4624639e6 Fix segfault when dragging mouse out of mainmenu window (#1910) 2014-12-13 00:39:07 +01:00
ShadowNinja
8af9d8b6ac Fix missing call to std::ostringstream::str 2014-12-12 16:32:11 -05:00
SmallJoker
19ccc27d37 Fix MSVC compiling warnings and remove an unused texture 2014-12-12 16:09:34 -05:00
kwolekr
093b1b47d9 Log: Silence errorstream during unittests 2014-12-12 15:51:55 -05:00
Anton
10e0cf8b2c Use std::string::empty() instead of size() where applicable 2014-12-12 15:16:24 -05:00
kwolekr
8066743a83 Settings: Fix invalid memory access when setting not found in working mem 2014-12-12 14:39:36 -05:00
kwolekr
2c9bbe2736 NodeResolver: Fix some comments and use const references for params 2014-12-12 14:21:41 -05:00
kwolekr
cf8213ea82 Add minetest.clear_registered_decorations() and clear_registered_ores() 2014-12-12 14:08:04 -05:00
MirceaKitsune
cec141adc1 Allow footstep sounds to play for liquid and ladder nodes, making swimming and climbing sounds possible 2014-12-12 16:47:47 +01:00
Kodexky
6ba50aa8f9 Responsive tooltip offset for Android.
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-12-13 00:43:37 +10:00
Craig Robbins
9f65fd6819 Fix typo in mapblock.h 2014-12-12 20:46:37 +10:00
kwolekr
4e5d17f666 LuaPerlinNoiseMap: Prevent invalid memory access when attempting to generate 3d noise with a buffer created for 2d 2014-12-12 02:46:52 -05:00
kwolekr
00fc0babe0 Mapgens: Rename m_emerge to prevent name collisions 2014-12-12 02:38:39 -05:00
kwolekr
2b8180a417 Add support for NoiseParams in minetest.get_perlin() and add docs on NoiseParams to lua_api.txt 2014-12-12 02:02:44 -05:00
kwolekr
d3dc88fe6b Settings: Fail on invalid sequence and throw exception for LuaSettings 2014-12-12 00:44:17 -05:00
kwolekr
b0c4fd6d3f Settings: Sanitize value for multiline terminator tokens 2014-12-11 23:26:13 -05:00
kwolekr
fb80a7c111 Clean up Noise macros 2014-12-11 02:53:10 -05:00
kwolekr
c07f15e910 NodeResolver: Fix cancelNode and cancelNodeList 2014-12-11 00:41:54 -05:00
kwolekr
16baed0467 Noise: Automatically transform noise maps if needed 2014-12-10 23:35:37 -05:00
kwolekr
dcc48976ce Move get_schematic and read_schematic to l_mapgen.cpp 2014-12-10 01:49:57 -05:00
paramat
4cf8042b7c Biome API: Reduce heat and humidity persistences to 0.5 2014-12-10 01:39:08 -05:00
kwolekr
a89f37bb65 Add support for lacunarity in legacy NoiseParams string format 2014-12-10 01:31:43 -05:00
Kahrl
daefd0ab36 Add paste command (Ctrl-V) in GUIChatConsole 2014-12-10 07:12:08 +01:00
kwolekr
cfba55ba0a Remove get_noiseparams function. read_noiseparams should be used from now on 2014-12-10 00:56:44 -05:00
kwolekr
fb2bc956b1 Noise: Create a deep copy of NoiseParams 2014-12-10 00:37:09 -05:00
kwolekr
88c28414f4 Settings: Sanitize setting name everywhere, not just LuaSettings 2014-12-09 23:52:13 -05:00
kwolekr
d50878d608 Rename and repurpose minetest.set_noiseparam_defaults to set_noiseparams 2014-12-09 23:44:04 -05:00
kwolekr
f2c18511a4 Settings: Make setting entry group and values mutually exclusive
This greatly reduces the complexity of Settings code.
Additionally, several memory leaks were fixed.
2014-12-09 23:29:34 -05:00
SmallJoker
2f8fbdb9f5 Rewrite fs:GetDirListing(file) by kahrl 2014-12-10 02:59:10 +10:00
SmallJoker
5229a229a6 Ignore .name directories and files
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-12-10 02:49:02 +10:00
Craig Robbins
c5f6f9f77a Increase performance of getLight() by at least 2x
Leads to the following increases:
getSmoothLight() approx.     40% increase
getTileInfo() approx.        25% increase
MapBlockMesh::MapBlockMesh() 25-30%
2014-12-10 00:52:02 +10:00
Pavel Puchkin
a1ea017b51 Fix builds failing on BSD-like (such as OSX) due to an irrlicht bug (temporary fix)
Details:
- https://sourceforge.net/p/irrlicht/bugs/433/
- https://github.com/minetest/minetest/issues/1687#issuecomment-61368769
- https://forum.minetest.net/viewtopic.php?f=42&t=9190&start=125#p159364

In case when "settings.h" is included from "emerge.cpp" or
"environment.cpp", u64 type has "unsigned long" length because
previously <stdint> was included. When "settings.h" is included from
"settings.cpp", u64 has "unsigned long long" length because no <stdint>
was included previously. This leads to different signatures of "setU64" method
and linker cannot find appropriate symbol.

The best fix of this bug should be done in the Irrlicht, but as hotfix I
think this is OK and better than types changing.

Previously this bug didn't appear because there was no "settings.cpp" file and
implementation of all methods was done in the header file.
2014-12-09 20:40:52 +10:00
kwolekr
941d000fc6 Noise: Update Noise::resizeNoiseBuf to account for lacunarity not equal to 2 2014-12-09 00:50:58 -05:00
kwolekr
29b413b376 Biomes: Make biome heat and humidity noise parameters user-configurable 2014-12-09 00:38:04 -05:00
Craig Robbins
7490368984 Fix compiler warning (signed vs. unsigned) 2014-12-08 23:00:49 +10:00
kwolekr
2a7c6d27b3 Optimize noise implementations 2014-12-08 03:26:29 -05:00
Kahrl
0183c05ee0 Fix struct vs. class in forward declarations 2014-12-08 09:06:31 +01:00
RealBadAngel
4f23778e53 Fix lighting artifacts (Issue #1887). 2014-12-08 08:53:31 +01:00
kwolekr
2fd3d52020 Add flags and lacunarity as new noise parameters
Add 'absolute value' option to noise map functions
Extend persistence modulation to 3D noise
Extend 'eased' option to noise2d_perlin* functions
Some noise.cpp formatting fixups
2014-12-07 21:59:32 -05:00
RealBadAngel
638f3a8454 Disable loading .mtl files. Theyre not used anyway. 2014-12-08 02:24:46 +01:00
MirceaKitsune
c5f6656f99 Make directional fog colors respect tonemap 2014-12-08 01:44:28 +01:00
Craig Robbins
5c55738276 Fix f6 debug/profiler display
After fonts were re-engineered the height of the f6 debug/profiler display would only display about 2-3 lines of text.
2014-12-08 00:01:22 +10:00
Calinou
bc2b8e9eef Increase third person view distance
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-12-07 21:54:44 +10:00
Muhammad Rifqi Priyo Susanto
5ffddc94c0 Add space between client names in status text (client)
Before:
Server: version=0.4.10, uptime=190.5, max_lag=0.001, clients={user1,user2,user3,user4,user5,foobar,userplayedminetestthismorning}

After:
Server: version=0.4.10, uptime=190.5, max_lag=0.001, clients={user1, user2, user3, user4, user5, foobar, userplayedminetestthismorning}
2014-12-07 21:32:08 +10:00
RealBadAngel
535c473103 Restore finalColorBlend implementation in shaders. 2014-12-07 11:05:00 +01:00
Craig Robbins
500f691426 Fix regression (increase/decrease viewing range with +/- keys) 2014-12-07 18:32:30 +10:00
kwolekr
2f134ce24f Mapgen V5: Fix use of uninitialized value in ctor 2014-12-07 01:19:42 -05:00
kwolekr
390c0cd691 Schematics: Fix minetest.place_schematic() when defined by a Lua table 2014-12-06 18:39:05 -05:00
kwolekr
60feb4ad25 Add minetest.clear_registered_biomes() api 2014-12-06 18:08:23 -05:00
Kahrl
f3abaec83b Ignore some mouse events sent from scrollbar to GUITable
Fixes #1567, #1806.
2014-12-06 22:45:23 +01:00
SmallJoker
d75f0b0360 Close settings files and save them correctly 2014-12-06 14:08:01 -05:00
sfan5
4fcf9fb66a Add workaround for failing clang build 2014-12-06 19:56:31 +01:00
kwolekr
5062b99cb0 Rewrite generate notification mechanism
Add support for notify-on-decoration
Clean up mapgen constructors
Clean up mapgen.cpp code style somewhat
Remove trailing whitespace from some files
2014-12-06 13:53:35 -05:00
Craig Robbins
2b119e1e19 Performance of main client loop up to 2x faster In places, up to 3 times faster
NOTE 1: This does not mean a 2x increase in framerate. Increase in fps may be up to 1-2fps
NOTE 2: This local 'caching' of settings is not optimal and an alternative solution will be worked on after 0.4.11 is released
2014-12-07 00:51:01 +10:00
Craig Robbins
0e78aa296e Add name of node 'pointed at' to debug
This is "Add name of node pointed at to debug #1677" by @rubenwardy updated to work with game.cpp after it was refactored.
2014-12-05 16:14:50 +10:00
SmallJoker
5da6896d51 Fix MSVC build
Note: The unit test was technically incorrect for all platforms but passes due to implicit casting
2014-12-05 16:09:53 +10:00
RealBadAngel
a648120d54 Recalculate normals for mesh #0. Fix for issue #1902. 2014-12-05 01:05:18 +01:00
Craig Robbins
f7f7fec497 (INTERIM) Make sizes of the font in formspecs consistent and not so large
Until a permanent fix can be developed
2014-12-05 02:35:21 +10:00
Craig Robbins
c16b1e2639 Optimise VoxelManipulator::copyFrom
~3-4x faster

This indirectly optimises MapBlock:copyTo() which in turn improves performance of MeshMakeData::fill()
2014-12-04 23:37:04 +10:00
Craig Robbins
f6912f4241 Right mouse button behaviour for craft/inventory If right mousebutton clicked once then don't drop single items into slots. If right mouse button has been clicked and held a second time, drop items as the mouse is moved. In the second case (automatically drop/place items as mouse is moved) only auto-drop into blank slots, or slots that contain the same item. 2014-12-04 23:30:53 +10:00
kwolekr
f0cd59034c Settings: Various setting group fixes and enhancements
- Remove blank setting values when setting has a group
 - Pair setting values with groups in file when possible
 - Preserve user-set whitespace in setting objects
 - Delete setting value when setting NoiseParams group
 - Delete overwritten groups outside of lock
2014-12-04 03:20:07 -05:00
paramat
0a5373d400 Add definable node_stone to biome API, mgv5, mgv7. Reduce and correct depth of mgv7 biomes. l_mapgen.cpp: add '#include mapgen_v5.h' because '#include mapgen_v7' is there. Improve underwater grass hack 2014-12-03 19:45:29 -05:00
kwolekr
fcb1ea903f Settings: Fix getNoiseParamsFromValue() 2014-12-02 21:09:16 -05:00
kwolekr
68c799bf99 Use setting groups for NoiseParams
Add format example to minetest.conf.example
Add Settings::setU16()
Throw exception on attempted access of NULL settings groups
2014-12-02 04:03:37 -05:00
sapier
93aab0362c Fix settings callback "call" lost on rebase 2014-12-01 19:47:57 +01:00
Craig Robbins
691b18c41b Fix node 0,0,0 being highlighted when enable_node_highlighting == false
Without this patch node 0,0,0 is highlighted when enable_node_highligting is false
There is a minor lighting issue remaining, however it seems to be related to a different bug (https://github.com/minetest/minetest/issues/1887)
2014-12-01 22:13:21 +10:00
Craig Robbins
d4f42938a5 Fix build
Note: this does not fix the warnings generated by clang
2014-12-01 15:17:47 +10:00
kwolekr
360660947b LuaSettings: Sanitize setting name strings 2014-11-30 19:01:54 -05:00
Kahrl
16781da4f9 Fix segfault at exit caused by non grabbed font 2014-11-30 23:21:14 +01:00
kwolekr
175b7a28e5 settings: Add setting groups and multiline entries 2014-11-30 16:11:21 -05:00
sapier
39162de15a Make hud use fontengine too
Fix non coding style conforming glb_fontengine to g_fontengine
Fix fonts never been deleted due to grabbed to often
2014-11-30 18:06:54 +01:00
Zefram
d1d6a97b1c Scale form elements consistently
The ratios between the sizes of form elements, including text, is now
fixed, aside from variations caused by rounding.  This makes form layout
almost fully predictable, and particularly independent of player's
screen size.  The proportions of non-text elements are the traditional
proportions.

For compatibility, the way in which element positions and sizes are
specified remains unchanged, in all its baroqueness, with one exception.
The exception is that the position of a label[] element is now defined
in terms of the vertically center of the first line of the label,
rather than the bottom of the first line of the label.  This change
allows a label to be precisely aligned with button text or an edit box,
which are positioned in a centering manner.  Label positioning remains
consistent with the previous system, just more precisely defined.

Make multi-line label[] elements work properly.  Previously the code set
a bounding rectangle assuming that there would be only a single line,
and as a result a multi-line label would be cut somewhere in the middle
of the second line.  Now multi-line labels not only work, but have
guaranteed line spacing relative to inventory slots, to aid alignment.

Incidentally fix tabheader[] elements which were being constrained to
the wrong width.

Given an unusually large form, in variable-size mode, the form rendering
system now chooses a scale that will fit the entire form on the screen,
if that doesn't make elements too small.  Fixed-size forms, including the
main menu, are have their sizes fixed in inch terms.  The fixed size for
fixed-size forms and the preferred and minimum sizes for variable-size
forms all scale according to the gui_scaling parameter.
2014-11-30 17:50:09 +01:00
sapier
dceb9f7d60 Implement proper font handling 2014-11-30 17:50:09 +01:00
kwolekr
25945dc539 noise: Throw exception on noise allocation failure 2014-11-29 16:52:45 -05:00
SmallJoker
a3e019c4f6 Fix MSVC compiling error (argc/argv not available to pass to init_gettext)
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-29 22:31:40 +10:00
Craig Robbins
edb125837c Fix regression with command line --go option 2014-11-28 22:48:46 +10:00
Ciaran Gultnieks
77137a92cf Don't corrupt stepheight when setting other properties 2014-11-26 20:02:48 +01:00
Kahrl
264d740c9d Wield: always obey anisotropic_filter setting, not just for hi res textures 2014-11-26 19:54:04 +01:00
Kahrl
571ba5d9c5 EMF_USE_MIP_MAPS was introduced in Irrlicht 1.8, don't use in 1.7.3 or below
This is not optimal as it will cause minor graphical glitches for
Irrlicht 1.7 users, but at least it fixes the build.
2014-11-26 19:17:50 +01:00
Sokomine
9f9279008c added enable_build_where_you_stand option
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-27 01:07:11 +10:00
Kahrl
ec5188a49a Wieldmesh: don't force anisotropic filtering on, instead disable mipmaps
This should fix #1844. Thanks to oleastre for making the first version
of this commit (#1848).
2014-11-26 15:17:17 +01:00
rubenwardy
8df8554fce Only set the camera update keymap when using a debug build
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-26 21:53:01 +10:00
Kodexky
9aaf67ebe0 Fix Android main menu crash, and user data directory check.
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-26 18:11:08 +10:00
Calinou
1c9f05d792 Increase step smoothing to fit 1:1 stairs (works well on slabs too)
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-26 17:28:02 +10:00
Craig Robbins
26cf98ccfc Fix client "double saving" simple singleplayer local maps 2014-11-26 00:49:54 +10:00
KodexKy
5413ed1195 Fixes for Android build errors. Enable sensor landscape rotation.
Fix typo in Android Makefile ndk path.
Fix touchscreen parts of game.cpp to work after Zeno's refactor.
Fix isdigit and isspace overload conflict with Android Irrlicht in string.h
Enable sensor landscape rotation in Android Manifiest.
Add mapgen v5 to Android build.
Fix Makefile not checking leveldb.

Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-25 13:28:51 +10:00
RealBadAngel
0164483310 Port createForsythOptimizedMesh from Irrlicht 1.8
Mesh rotation helpers.
2014-11-23 00:51:08 +01:00
Craig Robbins
21464639b3 Fix regression with USE_REDIS (refactor_main) 2014-11-23 01:12:25 +10:00
Craig Robbins
d6cc0d8223 refactor main.cpp 2014-11-23 00:27:02 +10:00
Craig Robbins
cb2d467665 Fix smooth lighting (ambient occlusion)
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-22 21:58:00 +10:00
Pavel Puchkin
f7f24d1470 Fix compiling if no endian.h found
f7d6509 introduces error when no endian.h found in the system.

Since "CHECK_INCLUDE_FILE" returns empty string instead of "0", when
"cmake_config.h" is generated it has "#define CMAKE_HAVE_ENDIAN_H " line.
Later we have "#define HAVE_ENDIAN_H CMAKE_HAVE_ENDIAN_H" in the
"config.h", an thus "HAVE_ENDIAN_H" is also empty sting. Because of
this, "#if HAVE_ENDIAN_H" is incorrect preprocessor directive.

Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-22 21:56:38 +10:00
Rafael Reilova
f7d65091f8 serialize.h: use machine native byte swapping if available, fall-back to previous generic method if not (supported for GCC using endian.h, detection done in cmake) write/readARGB8() - just write 32-bit color in one op, instead of 4 1-byte ops cleanup: removed unneeded buffer init for some serialize-out functions use a #define for the fixed point factor in read/writeF1000()
nodemetadata.cpp, nodetimer.cpp
	optimzation: simpler deserialize node position method

staticobject.cpp:
	cleanup: use util/serialize.h inlines instead of its own de/serialization

serialize.cpp:
	minor optimization/cleanup: avoid generation of unneeded string temporary

CMakeLists.txt, cmake_config.h.in: detection of endian.h

config.h: added HAVE_ENDIAN_H

Commits due to feedback squashed

Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-21 22:33:48 +10:00
Craig Robbins
d406ac994b Optimise functions from CNodeDefManager and VoxelManipulator
CNodeDefManager::get()
VoxelManipulator::addArea()
2014-11-21 14:56:45 +10:00
Craig Robbins
ea404979e1 Optimise getTileInfo()
getTileInfo() ~1.5x faster
getSmoothLight ~2.0x faster
2014-11-21 14:56:45 +10:00
paramat
fcdb1a8fc2 Mgv5 1 up 1 down overgeneration for biome surface continuity 2014-11-20 23:13:09 -05:00
paramat
d39887dadd Mgv5 get ground level at point function. Fast spawn player version 2014-11-20 21:07:20 -05:00
ShadowNinja
c4e393deea Simplify loading of Android version of menu 2014-11-20 15:37:20 -05:00
Kodexky
b9bc8dadb2 Fix raillike bug (currently manifests itself on Android), and minor improvement to readability.
NB: Minor edits to patch made by Zeno- (int to short and minor formatting)
2014-11-20 15:41:59 +10:00
ShadowNinja
b1965ac209 Clean up rollback 2014-11-19 16:21:59 -05:00
ShadowNinja
da0f1e5497 Fix wallmounted mesh rotations 2014-11-19 16:17:54 -05:00
sfan5
9d69436052 Add (optional) client-side saving of server map to disk 2014-11-19 15:11:23 +01:00
Kahrl
55e4c35eaf Remove unused rangelim function (the macro still exists) 2014-11-19 10:19:52 +01:00
Craig Robbins
f0a8f655c0 Fix double free bug when server is shut down
Thanks @oleastre
2014-11-15 22:33:52 +10:00
kwolekr
8831703428 Fix NoisePerlin3DEased return value 2014-11-14 21:19:46 -05:00
kwolekr
8d3a68f343 Fix warnings and other misc. minor changes 2014-11-14 03:07:12 -05:00
Craig Robbins
5b8855e83c Remove most exceptions from getNode() (and variants) 2014-11-14 18:05:34 +10:00
SmallJoker
874109c520 Add option 'eased' to NoiseParams
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-13 23:06:38 +10:00
kwolekr
b57478b93b Fix compilation under some Linux distributions 2014-11-13 00:16:37 -05:00
kwolekr
c3ad08708f Mapgen v7: Fix uninitialized spflags
Mapgen v5: Fix minor style issue
2014-11-12 23:58:50 -05:00
kwolekr
fc9521874c Add eased 3d point-value noise functions 2014-11-12 23:49:45 -05:00
kwolekr
7616537bc0 Add Generator Element Management framework
Add BiomeManager, OreManager, DecorationManager, and SchematicManager
2014-11-12 23:02:41 -05:00
RealBadAngel
f25cc0dbae Wielded fixes. Add shaders support. 2014-11-13 03:51:04 +01:00
Craig Robbins
45ebaa3524 Fix profiler values not being updated (F6) and not being logged 2014-11-11 20:58:57 +10:00
Kahrl
0adadba218 Serverlist: announce mg_name from map_meta.txt instead of minetest.conf 2014-11-10 22:27:10 +01:00
Zeno-
a1e9732407 Merge pull request #1825 from Zeno-/control_key_cache
Create faster key cache for main game loop (client)
2014-11-10 19:12:25 +10:00
Craig Robbins
987e565eeb Create faster key cache for main game loop (client) 2014-11-10 12:26:19 +10:00
paramat
10a47b7fee Tune cave noise scales to 6. Fix blobs spflag, now enabled. Update conf.example 2014-11-09 20:21:39 -05:00
Kahrl
9b551d5cbc Implement WieldMeshSceneNode which improves wield mesh rendering
- Don't create and cache an extruded mesh for every (non-node) item.
  Instead use a single one per image resolution.

- For cubic nodes reuse a single wield mesh too

- Improve lighting of the wielded item

- Increase far value of wield mesh scene camera, fixes #1770

- Also includes some minor refactorings of Camera and GenericCAO.
2014-11-08 23:11:57 +01:00
Craig Robbins
cc8d7b8640 Stop inserting empty lines at end of minetest.conf file each time it is rewritten
See: https://github.com/minetest/minetest/issues/1790
2014-11-08 21:57:52 +01:00
Craig Robbins
1c21e391ed Fix regressions and minor improvements in refactor_the_game
a) Fix double tap for jump and show_debug
b) Revert changes to limitFps()... there is no verification that the new method was an issue, but going back to old method just in case
b.2) limitFps() no longer calls device->run() and also no longer has to be called immediately after a call to device->run()
2014-11-08 21:40:11 +01:00
paramat
92981b2fee Add mgv5. New noise code, uses biome API. Eased 3d noise for terrain, caves, blobs 2014-11-08 21:37:26 +01:00
RealBadAngel
d0be27415e Speed up removing a node (less block mesh updates). 2014-11-08 21:04:30 +01:00
SmallJoker
c40e993ce4 Replace setting unlimited_player_transfer_distance with player_transfer_distance 2014-11-08 14:56:09 +01:00
Craig Robbins
96fcca4ea0 Address issues related to refactoring the_game
Fix time of day persistence
Fix wield item being updated every frame causing small performance hit
Rename some classes and variables
2014-11-03 13:57:56 +01:00
Kahrl
817e3a6c64 Fix regression: mouse wheel couldn't scroll from last hotbar item to first 2014-11-02 21:59:56 +01:00
Craig Robbins
43bf4324d5 Cleanup and (mostly) document util/string.h and (very) minor refactoring
Updated: Incorporated feedback from 'kahrl'
Updated: Moved MinetestApp::boolToCStr() from game.cpp into string.h renaming it bool_to_cstr()
2014-11-02 18:07:20 +01:00
Kahrl
8040806f22 Include mg_decoration.h, mg_ore.h from emerge.cpp to fix warnings 2014-11-02 17:52:30 +01:00
Craig Robbins
209c0dd1af Fix unit tests failing if IPv6 not available
See:
https://github.com/minetest/minetest/issues/1526
https://github.com/minetest/minetest/issues/793
2014-11-02 02:27:26 -05:00
Craig Robbins
dfd15fd1d9 Modified dtime calculation method in limitFps() 2014-11-02 02:20:06 +01:00
Craig Robbins
429ecb2b94 Refactor the_game() to make it more understandable and maintainable.
The following is a record of 31 commits before squashing:

Revert "Remove m_ext_ptr in GUIFormSpecMenu, replaced by refcount mechanism"

This reverts commit b49e5cfc7013cef7e9af79d17e04f7e7e4c377d4.

Basic reformatting with astyle
-- additional formatting will be modified, manually, as the need for it is encountered

Start "outlining" what a MinetestApp class might look like

Add MinetestApp::shutdown()

Converted class member functions to camelCase and created protos for new functions

First stage of connect to server done

Add get itemdefs/nodedefs/media code

Init clouds, camera, sky, init GUI, HUD

Input handling

Client events, camera, sound, draw

Fix wield hand getting stuck digging and add debug text back

Fix FPS

Added profiler graph back

Fix FPS issue
Need to work out what went wrong and clean up the copy/paste stuff

Annotate

Various:
Rewrote limitFps()
Limited scope of some variables

Jitter calcs

Reduce scope of objects

Move some stuff out of ::run and minor formatting cleanup

Scope reduction

Function splits

Removed old (broken) limitFps()

Added exception handling back

Fixed some formatting

Reverted commented out unit tests (uncommented them)

Slow clouds down on loading and media screens so the behaviour is like the original the_game()

Formatting/style (no functional changes)

Manually reapply upstream b49e5cf: Remove m_ext_ptr in GUIFormSpecMenu, replaced by refcount mechanism

Fixed silly errors on my part
Minor formatting cleanups

Removed strange differentiation in FPS limiting when loading
FPS limiting was done differently if cloud_menu_background was true, which does not make sense

Cleaning up

Add some comments
2014-11-02 02:18:25 +01:00
kwolekr
9e811a92e7 Split up mapgen.cpp 2014-11-01 13:16:23 -04:00
kwolekr
db25f75337 Fix erroneous lua_pop parameter 2014-10-30 16:23:48 -04:00
kwolekr
f0ae2da89e Fix uninitialized variable warning 2014-10-30 02:53:20 -04:00
kwolekr
6b4307791a mapgen: Resolve nodes in ctor rather than makeChunk 2014-10-30 02:29:37 -04:00
kwolekr
03f3f958ed Check minetest.hud_change() parameters on conversion (Fix #1714) 2014-10-30 00:12:12 -04:00
Craig Robbins
6c9bbb0360 Fix bug introduced by me (Zeno) 2014-10-29 08:54:16 +01:00
RealBadAngel
dd4c21c180 Add option to enable mesh caching, add wallmounted for meshes. 2014-10-29 08:37:33 +01:00
Craig Robbins
813c088c1c Added names colours and refactored parseColorString() 2014-10-29 03:10:59 -04:00
kwolekr
1cb6ea6346 Refactor decoration-related code
Split up ModApiMapgen::l_register_decoration()
Define and make use of CONTAINS() and ARRLEN() macros
2014-10-29 01:56:37 -04:00
PenguinDad
7c6da2f384 Fix various indentation issues 2014-10-28 15:37:58 -04:00
Craig Robbins
6396712ec4 Fix #1733: An unhandled exception occurred: GetPeer: Peer not found (possible timeout) 2014-10-28 13:39:23 -04:00
kwolekr
4a3592ff9a Add NodeResolver documentation
Set content to fallback on AddNode failure
Consider node list requests with no results as failed
2014-10-28 02:23:45 -04:00
kwolekr
bc28ca0636 Prevent invalid memory access under failure conditions 2014-10-28 00:18:53 -04:00
kwolekr
6ddf458504 Change license of noise implementation to Simplified BSD 2014-10-27 21:17:07 -04:00
kwolekr
b994a7af13 Add support for eased 3d noise 2014-10-27 02:02:38 -04:00
kwolekr
d274cbfce6 Add NodeResolver and clean up node name -> content ID resolution system 2014-10-26 23:55:45 -04:00
Kahrl
b49e5cfc70 Remove m_ext_ptr in GUIFormSpecMenu, replaced by refcount mechanism 2014-10-24 21:14:48 +02:00
Pavel Puchkin
73bf791fe1 Remove remenants of mob code
Since minetest has no mobs within the core anymore, I suppose these
settings and code should go. Any mod that uses `minetest.setting_getbool`
will work with no problem since the default return value is `false`.
2014-10-23 20:54:33 -04:00
RealBadAngel
7e34621b1d Fix broken plantlike drawtype. 2014-10-22 21:15:31 +02:00
David Thompson
fd5eaae2ba Search for subgames using $MINETEST_SUBGAME_PATH. 2014-10-22 21:05:14 +02:00
RealBadAngel
d221917170 Recalculate normals for cached meshes.
Check if mesh is here before adding to meshcollector.

Fix deleting the meshes.
2014-10-21 18:43:29 +02:00
Kahrl
9029a34cc6 Fix some indentation in nodedef.cpp 2014-10-20 16:11:38 +02:00
Kahrl
ae375cc322 Fix memory leak caused by mesh nodes (and nodeboxes) 2014-10-20 16:11:00 +02:00
RealBadAngel
e5652cb75c Custom collision boxes node property. 2014-10-19 20:48:21 +02:00
Craig Robbins
076c5ee223 Various uninitialised variable fixes
sky.cpp: m_bgcolor.getAlpha() was being used before initialised

mesh related: m_highlight_mesh_color was being used uninitialised
2014-10-19 15:33:08 +02:00
Craig Robbins
fe8ef1be59 Move buttons upwards to accommodate for new configure keys button in the
pause menu
2014-10-18 17:30:17 +02:00
RealBadAngel
0066bd77d2 Add meshnode drawtype. 2014-10-18 16:42:23 +02:00
Kahrl
d1ccc64e1e Make sure PRECISION_SECONDS corresponds to the integer 0 2014-10-09 11:40:33 +02:00
Kahrl
26495da94a Fix unit reported by TimeTaker (was always ms) 2014-10-09 11:15:03 +02:00
Craig Robbins
914f850d31 Fix use of unitialized variables in mouse button handling 2014-10-08 14:56:29 -04:00
Mushiden
7b548cd2b5 Add in-game key change menu 2014-10-07 17:24:09 -04:00
ShadowNinja
741df993ff Fix object reference pushing functions when called from coroutines 2014-10-07 16:37:45 -04:00
BlockMen
28438bba27 Add [colorize modifier 2014-10-05 16:49:52 +02:00
kwolekr
173beeee65 Fix special tile backspace culling 2014-10-03 11:20:29 -04:00
RealBadAngel
b9cb196d49 Bugfix: dont highlight (0,0,0) when theres no node pointed. 2014-10-03 16:03:14 +02:00
RealBadAngel
0920f55eb4 Fix broken plantlike drawtype. 2014-10-03 15:33:32 +02:00
kwolekr
37d3c3d328 Fix misc. style issues 2014-10-03 03:49:06 -04:00
kwolekr
01ce57ade5 Clean up nodedef.cpp 2014-10-03 03:21:08 -04:00
BlockMen
f48f686930 Add optional framed glasslike drawtype 2014-10-02 11:35:15 +02:00
ShadowNinja
e9c9b66ae9 Make players check inventory modification properly 2014-10-01 18:44:36 -04:00
ShadowNinja
8b3135a643 Only set player dirty flag if values change 2014-10-01 18:44:36 -04:00
ShadowNinja
cd0df0d5e7 Simplify player modification checks 2014-10-01 18:44:36 -04:00
sapier
b37bff72f1 Fix android build using hardcoded path for data instead of using the one fetched by android api on init.
Fix android missing version information
2014-10-01 22:18:29 +02:00
BlockMen
61ed56f916 Standardize tooltip row detection 2014-09-28 10:10:43 +02:00
BlockMen
b75e7148c2 Fix multilined description in tooltips (fixes #1688) 2014-09-28 08:44:05 +02:00
sapier
121e8cc2a1 Fix totally messed up 3d modes interlaced/topbottom/sidebyside 2014-09-25 20:37:06 +02:00
sapier
15c7460eda Fix chat lines not word wrapped correct 2014-09-25 19:54:02 +02:00
Kahrl
5ca5630a11 Fix command line parsing
Broken by 6bc4cad0eddd7a7cf593ca1471599e2d75727379, e.g.
  minetest --worldname world
would be parsed as
  minetest --worldname --worldname
2014-09-22 11:02:26 +02:00
ShadowNinja
56195dc2e4 Fix build with redis
Broken by 6bc4cad0eddd7a7cf593ca1471599e2d75727379 because database-redis.h
depended on settings.h to include filesys.h.
2014-09-21 21:02:49 -04:00
TriBlade9
9a685a4f2e Add firelike drawtype 2014-09-21 15:50:27 -04:00
ShadowNinja
fb35cfb2dc Fix GCC reorder warning
Caused by a020d1b653f94fbcaac06c15f9dbab4521fda355.
2014-09-21 15:23:36 -04:00
sruz25
f6321e277b Add inventory right click drag and drop 2014-09-21 15:23:27 -04:00
ShadowNinja
c061bdd37f Fix locking bugs and make inventory deserialization errors more specific 2014-09-21 14:39:36 -04:00
ShadowNinja
6bc4cad0ed Split settings into seperate source and header files
This also cleans up settings a bit
2014-09-21 14:39:35 -04:00
ShadowNinja
2ae5d3f3ab Fix Settings locking 2014-09-21 14:39:35 -04:00
ShadowNinja
cd64a92a8c Use const references for Settings methods
Also check for (this == &other) before locking mutexes.
2014-09-21 14:39:35 -04:00
Craig Robbins
b97c9c6577 Make getters of the Settings class const
Also removed 2 unused functions.
2014-09-21 14:39:35 -04:00
BlockMen
a020d1b653 Allow taking screenshots of formspecs and move message to chat 2014-09-21 19:15:48 +02:00
ShadowNinja
406ed5efac Add compression API 2014-09-20 14:02:54 -04:00
donat_b
c9cab6bcab Make config compatible with C++11 2014-09-20 11:20:13 +02:00
ShadowNinja
8852333eb3 Use configured bind_address for HTTPFetch 2014-09-18 21:54:23 -04:00
ShadowNinja
86a3c8ce56 Reduce indentation of HTTPFetchOngoing
Also clean up some related things.
2014-09-18 21:54:22 -04:00
TriBlade9
18bfa1c785 Added configurable selectionbox width. Min width = 1, Max = 5 2014-09-19 03:28:46 +02:00
RealBadAngel
86a0f5603b Bugfix: don't highlight air nodes. 2014-09-18 09:56:27 +02:00
RealBadAngel
58e6d25e03 Node highlighting. 2014-09-17 22:06:13 +02:00
Kahrl
206f076422 Fix typo in comment in chat.cpp 2014-09-14 15:37:27 +02:00
ShadowNinja
2f170a63c6 Simplify and optimize schematic replacements 2014-09-11 22:25:06 -04:00
sapier
62ea342ad1 Log unhandled exceptions in connectionthreads to errorstream 2014-09-06 18:22:27 +02:00
sapier
944e79d7a6 Fix access to invalid data on reception of packet with size 0 2014-09-06 17:42:34 +02:00
BlockMen
8948907431 Change screenshot colorformat properly 2014-09-03 19:41:29 +02:00
BlockMen
b2102bfe49 Don't save alpha channel in screenshots (fixes #1451) 2014-09-03 11:39:29 +02:00
kwolekr
f3eefeb794 Add LuaVoxelManip methods: get_node_at() and set_node_at() 2014-09-01 17:33:21 -04:00
kwolekr
9e4e7072da Update Mapgen VoxelManipulator on buffer invalidation 2014-09-01 15:12:22 -04:00
kwolekr
3fa4f782d9 Save previously generated blocks on Mapgen blitback 2014-09-01 14:58:05 -04:00
sapier
e5b4748bb4 Fix only one texture being updated on window resize breaking sidebyside and topbottom 3d modes 2014-08-29 01:35:35 +02:00
sapier
fb2183b61d Fix interlaced 3d mode second image being flipped on compiling against irrlicht >= 1.8 2014-08-29 00:54:46 +02:00
RealBadAngel
e66bb9b864 Allow use all 6 faces for special tiles.
Protocol version bump.
2014-08-25 12:47:06 +02:00
sapier
e09293b483 Add lua exception handling test code
Catch some error situations when mod used without thinking about it
2014-08-23 20:53:34 +02:00
Kahrl
3e267a6ece Fix LuaJIT exception wrapper 2014-08-23 20:41:03 +02:00
Craig Robbins
f33d31693e Fix seg fault if popping from empty stack (L-system trees)
See: https://github.com/minetest/minetest/issues/1525

Background
Wuzzy2: If you attempt to spawn a L-system tree with minetest.spawn_tree, you can make Minetest crash if it is attempted to pop an empty stack.

ShadowNinja: This shouldn't cause a segmentation fault, but it should throw a Lua error

Commit Description
This commit throws a Lua error instead of causing a segmentation fault. The server will still "crash" but will include a Lua backtrace.

L-Systems fix randomness
Unless a random seed is provided (via Lua treedef) seed the PRNG with a different seed for each tree
Resolves: https://github.com/minetest/minetest/issues/1469

Fix l-system crash when treedef random_level not set by Lua
2014-08-23 06:40:27 +02:00
sapier
996ea60642 Add video driver selection to settings menu (based uppon idea from webdesigner97) 2014-08-23 01:55:54 +02:00
sapier
7940a4264a Fix chat messages capturing mouse interactions for menu/formspecs 2014-08-23 00:23:14 +02:00
SmallJoker
55c646c5c2 Use pause_fps_max also on multiplayer 2014-08-22 22:52:20 +02:00
sfan5
b19dd922ec Add ^[mask texture modifier 2014-08-22 22:42:04 +02:00
SmallJoker
e4d570eafc Reduce time of red screen when damaged
10 seconds in PvP is very long and annoying.
2014-08-22 22:19:07 +02:00
Selat
c58b9d8da3 ban.cpp refactoring 2014-08-22 22:03:08 +02:00
sapier
dec8c43de3 Fix to to too two times 2014-08-22 21:51:20 +02:00
sapier
d7d8aa1039 Add player name length checks 2014-08-22 21:18:43 +02:00
sapier
8e9d896f2d Fix "ghost" blocks if block update is "on wire" while player digs nodes 2014-08-22 20:56:16 +02:00
sapier
247a1ebf23 Improve timeout calculation
gf
2014-08-22 20:56:16 +02:00
RealBadAngel
d9df592da8 Pass light sources in blue channel of vertex color instead of decoded light for all special drawtypes.
Plus some style fixes and optimizations.
2014-08-21 23:28:01 +02:00
sapier
2a5c88bde1 Don't call a player event without having player to do a event for 2014-08-21 17:29:26 +02:00
sapier
c24e0753fc Mod profiling support
Config settings:
profiling = true/false (gather statistics)
detailed_profiling = true/false (break mod times to callbacks)

Chat commands:
save_mod_profile saves current statistics in debug.txt and shows on console (on default loglevel)
2014-08-19 22:22:57 +02:00
sapier
4caa00cc99 Make scrollbar scale according to DPI and scaling factor 2014-08-16 15:30:56 +02:00
RealBadAngel
bf91d623c8 Let lighting be done only CPU side. Remove finalColorBlend implementation from shaders. 2014-08-16 14:48:52 +02:00
sapier
0a57b5b553 Revert "Fix inventory items blinking on item preloading"
The fix didn't work on some systems sadly this wasn't detected prior merge,
as preload is disabled by default now there's not gonna be a fix for it.
2014-08-16 14:18:33 +02:00
sapier
ccf3985b7a Fix inventory items blinking on item preloading 2014-08-16 13:00:37 +02:00
selat
5f1f1151d3 Remove temporary file at safeWriteToFile() 2014-08-16 12:46:48 +02:00