aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2016-02-08Cleanup selection mesh code, add shaders for halo and selection boxesRealBadAngel
2016-02-08small drawItemStack cleanupest31
-> Replace the three bool params with an enum -> Add struct for the static content, leads to less repetition -> cache enable_animations setting
2016-02-07Use meshes to display inventory itemsRealBadAngel
2016-02-07Use tangent space meshes only when shaders are enabledRealBadAngel
2016-02-02Mgvalleys: fix riverbeds below sea levelDuane Robertson
Stop riverbeds from forming plateaus under sea. Minor corrections to random lava/water placement.
2016-02-02Mgv5/v7/flat/fractal: Move tunnel noise calculation into generateCavesparamat
Tunnel 3D noises are only calculated when solid terrain is present in mapchunk, avoiding large amounts of unnecessary calculations Change 'int' to 's16' in calculateNoise Change 'i' to 'vi' for voxelmanip indexes for consistency Keep 'u32 index3d' local to a smaller part of tunnel code Mgv7: Don't call CaveV7 if no solid terrain in mapchunk Give 'open' bool a more descriptive name
2016-01-31Mgvalleys: use standard cavesDuane Robertson
Replace simple caves with V5 caves, adding unpredictable water and lava settings and massive caves based on subterrain. Remove fast terrain mode and accompanying settings. Remove superfluous temperature/humidity settings. Remove lava/water height setting. Fix errors in humidity handling and remove humidity_break_point setting. Move cave noises to generateCaves. Fix minor formatting/naming issues and use MYMAX/MYMIN/myround.
2016-01-29Fix OSX building issue caused by ad884f2Pavel Puchkin
2016-01-29Don't pass non-const references to collision methodsest31
Non const references cause a lot of confusion with behaviour of code, and are disallowed by minetest style guide.
2016-01-29Clocksource: use a better clock if available.Auke Kok
clock_gettime() is a far better clock than gettimeofday(). Even better than clock_gettime() is that you can select either CLOCK_MONOTONIC, or even CLOCK_MONOTONIC_RAW. These clocks offer high precision time. And the _RAW variant will never roll back due to NTP drift or daylight savings, or otherwise. I've adjusted this code to select the right clock method auto- matically based on what's available in the OS. This means that if you're running a very old linux version, MacOS or other, you will automatically get the best clocksource available. I've tested all Linux clocksources by selectively compiling and running a 10k+ timer test suite. In all cases I confirmed that the 3 POSIX Linux clocksources worked properly, and were selected properly. I've modified the OS X compile path to use the high-res clock source for all time functions, but I can't confirm it works or that it compiles. As for WIN32, I confirmed that the used clocksource is indeed a Monotonic clocksource, so good news: that code section appears to be exactly what it should be.
2016-01-28Don't print whole json data buffer to errorstream on errorest31
`errorstream` must not be overly verbose as clientside it is directly printed onto the ingame chat window. These days, the serverlist can contain > 200k bytes, so better print it to warningstream if the data buffer is too long.
2016-01-23Backface culling: Ignore setting in tiledef from old servers.Auke Kok
Outdated servers are always sending tiledefs with culling enabled no matter what, as the value was previously entirely ignored. To compensate, we must (1) detect that we're running against an old server with a new client, and (2) disable culling for mesh, plantlike, firelike and liquid draw types no matter what the server is telling us. In order to achieve this, we need to bump the protocol version since we cannot rely on the tiledef version, and test for it being older. I've bumped the protocol version, although that should have likely happened in the actual change that introduced the new backface_culling PR #3578. Fortunately that's only 2 commits back at this point. We also explicitly test for the drawtype to assure we are not changing the culling value for other nodes, where it should remain enabled. This was tested against various pub servers, including 0.4.13 and 0.4.12. Fixes #3598
2016-01-23Fix texture tear issueRealBadAngel
2016-01-23Fix C++11 compilabilityest31
Previous commits broke it... :(
2016-01-20Liquid flow: Prevent water spreading on ignoreparamat
2016-01-20Allow per-tiles culling.Auke Kok
Backface culling is enabled by default for all tiles, as this is how the lua parser initializes each tiledef. We revert to always using the value from the tiledef since it is always read and serialized. Mods that wish to enable culling for e.g. mesh nodes, now can specify the following to enable backface culling: tiles = {{ name = "tex.png", backface_culling = true }}, Note the double '{' and use of 'name' key here! In the same fashion, backface_culling can be disabled for any node now. I've tested this against the new door models and this properly allows me to disable culling per node. I've also tested this against my crops mod which uses mesh nodes where culling needs to be disabled, and tested also with plantlike drawtype nodes where we want this to continue to be disabled. No default setting has changed. The defaults are just migrated from nodedef.cpp to c_content.cpp.
2016-01-19EmergeManager: Do not queue duplicate block requestskwolekr
2016-01-19Fix Settings::remove() always returning trueKahrl
2016-01-18Show infotext with description for item entitiesRealBadAngel
2016-01-18Correct overflowing rivers in Valleys mapgen.Duane Robertson
2016-01-18Fix wield item glitchRealBadAngel
2016-01-16Prevent spawning in rivers with valleys mapgen. Remove unecessary whitespace.Duane Robertson
2016-01-15Make ItemStack:set_count(0) clear the item stacksfan5
fixes minetest/minetest_game#786
2016-01-15Make all mesh manipulators in mesh.cpp work with any vertex typeKahrl
cloneMesh() has to use a switch in order to create a different mesh buffer type depending on vertex type. (Credit: the new cloneMesh was written by RealBadAngel.) To avoid repetitive code, all other methods use getVertexPitchFromType() to automatically adapt the indexing to the vertex type at runtime.
2016-01-14Add Valleys mapgen.Duane Robertson
2016-01-14Mgv7/flat/fractal: Place biome top node on tunnel entrance floorparamat
2016-01-11Mapgen: Various fixes and improvementsparamat
Lua_api.txt: Document 'minetest.registered_biomes' Minimal: Remove 'mapgen_air' alias Cavegen: Add fallback node for 'mapgen_ice' Dungeongen: Add fallback node for 'mapgen_river_water_source' Mgv5: Remove unnecessary '#include util/directiontables.h' Add missing 'this->'s in makeChunk() Mgv6: Edit empty line formatting Remove leading spaces in makeChunk() Add missing spaces after 'for' and 'if' Mgv7: Edit empty line formatting
2016-01-10Mgflat: Set blank default spflags. Unhideparamat
2016-01-09Cache disable_anticheat and check it for "interacted_too_far"ASL97
2016-01-09New 3D Mode: PageflipDalai Felinto
The pageflip mode requires a stereo quadbuffer, and a modern graphic card. Patch tested with NVidia 3D Vision. The mini-map is not drawn, but that's what is done for topbottom and sidebyside modes as well. Also most of the time the user would prefer the HUD to be off. That's for the user to decide though, and toggle it manually. Finally, the interocular distance (aka eye separation) is twice as much as the "3d_paralax_strength" settings. I find this a strange design decision. I didn't want to chance this though, since it's how the other 3d modes interpret this settings.
2016-01-09Replace instance of readsome with read in decompressZlib Make decompressZlib ↵gregorycu
more robust
2016-01-08Fix redis error reportingest31
Previously, we assumed that reply->str was NULL terminated. However, this turned out to be not true, as users reported crashes in strlen connected to where reply->str was appended to an std::string. Use the method recomended by the docs, to read the length separately.
2016-01-07Liquids: Flow into and destroy 'floodable' nodesparamat
Add new node property 'floodable', default false Define "air" as floodable = true in C++ and lua
2016-01-04Fix for commit 87dcee6 It uses the wrong variable and only covers some use ↵gregorycu
cases. This change covers all use cases.
2016-01-03Add MinSizeRel and RelWithDebInfo to MSVCBuildDir checkgregorycu
2016-01-03Prevent technically unsafe access with empty vectorgregorycu
2016-01-01filesys: safeWriteToFile(): Remove the target file before rename only on WindowsPerttu Ahola
Removing the target file on other platforms was enabled likely unintentionally by commit 5f1f1151d3a9c113902630adc16cc3f4845da7ba. This may be the reason why there has been corruption of files on Linux on hard shutdowns. Previously I described the problem and this fix in issue #3084.
2015-12-30Fix client crashing when connecting to serverest31
My commit e2d54c9f9275e4f77ec33be8054621d42945f7a4 "shutdown when requested from lua in singleplayer too" broke minetest's feature to connect to servers. The client crashed after the connection init was complete. Thanks to @sofar for reporting the bug. Fixes #3498.
2015-12-30Fix cache path with RUN_IN_PLACEShadowNinja
If an `XDG_CACHE_HOME` can't be found or `RUN_IN_PLACE` is enabled, `path_cache` is left at its default of `$PATH_USER/cache` (at a time when `PATH_USER` is `..`), rather than being reset to `$PATH_USER/cache` after `PATH_USER` has been properly set.
2015-12-30Include custom error message in all SQLite3 exceptions.Rogier
And replace manual tests for error with SQLOK() where possible.
2015-12-30Handle SQLITE_BUSY errors gracefullyRogier
This allows other applications (e.g. minetestmapper) to interrogate the database while minetest is running, without causing an almost certain minetest crash.
2015-12-29Add macos/freebsd missing endian.h include and add win endianness infoqiukeren
2015-12-29Revert "Refactoring and code style fixes in preparation of adding mesh typed ↵Sapier
items" This reverts commit f14e7bac54af65e3d3d99f89f23f114b17058e49. Reverted due to missinterpretation of agreement, obvious dislike and me not interested in doing fights for feature I don't actually need
2015-12-29Revert "Add support for using arbitrary meshes as items"Sapier
This reverts commit 91bafceee6606fab79db1bde4cba01b84fed65c7. Reverted due to missinterpretation of agreement, obvious dislike and me not interested in doing fights for feature I don't actually need
2015-12-29Make collisionMoveSimple time overflow message written to log/show up at max ↵Sapier
once per step
2015-12-29Add support for using arbitrary meshes as itemsSapier
2015-12-29Refactoring and code style fixes in preparation of adding mesh typed itemsSapier
2015-12-29shutdown when requested from lua in singleplayer tooest31
Before, minetest.request_shutdown didn't shut down singleplayer instances or server instances from the server tab. This commit fixes this. Fixes #3489.
2015-12-29Database backends: fix bug, and small speedupest31
-> Redis backend: break from switch to fix bug -> Dummy and redis backends: reserve the count so that creating the list is faster
2015-12-21Fix lua object:get_properties() being brokenSapier