Commit Graph

4167 Commits (master)

Author SHA1 Message Date
Jeija 719bd6bf7e Merge branch 'master' of https://github.com/minetest/minetest 2016-10-07 21:37:03 +02:00
sfan5 0a16e53b40 Fix C++11 Windows build of threading code
The initial problem was that mutex_auto_lock.h tries to use std::unique_lock<std::mutex>
	despite mutex.h not using C++11's std::mutex on Windows. The problem here is the mismatch
	between C++11 usage conditions of the two headers. This commit moves the decision logic
	to threads.h and makes sure mutex.h, mutex_auto_lock.h and event.h all use the same features.
2016-10-06 22:37:30 +02:00
Loic Blot 155288ee98 use unordered containers where possible (patch 4 on X)
Also remove some unused parameters/functions
2016-10-06 22:37:26 +02:00
SmallJoker b66a5d2f88 Fix narrow string compiling issue on MSVC2010 2016-10-06 13:57:40 +02:00
Loic Blot 667975fe3a Use more unordered_maps to improve performance in c++11 builds 2016-10-06 12:33:35 +02:00
SmallJoker 997fc59c7e Use relative position for nametags 2016-10-06 12:13:37 +02:00
Jeija 7b9cf89c1d Merge branch 'master' into sphere 2016-10-06 11:50:44 +02:00
est31 de83c29ba0 Fix crash regression when chatting in the ncurses console
Fixes #4579, a regression introduced by commit

d4c76258e3 "Chat: new settings to prevent spam"
2016-10-06 07:45:50 +02:00
Loic Blot 61d1751dff Travis: build matrix improvements + CPP11 build 2016-10-06 00:28:24 +02:00
Loic Blot 7fab86a49d Compilation fix 2016-10-05 20:58:05 +02:00
Loic Blot 613797a304 Replace various std::map with UNORDERED_MAP + various cleanups
This is part 2 for 5f084cd98d

Other improvements:

* Use the defined ItemGroupList when used
* make Client::checkPrivilege const
* inline some trivial functions
* Add ActiveObjectMap typedef
* Add SettingsEntries typedef
2016-10-05 10:53:19 +02:00
Loic Blot 5f084cd98d Make some maps unordered to improve performance
* This permit to improve performance on C++11 builds
* use some existing typedefs in tools maps
* minor code style changes
2016-10-05 07:30:32 +02:00
Loic Blot d4c76258e3 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
2016-10-05 00:13:37 +02:00
paramat 1079aeaa13 Mapblock_mesh_generate_special: Improve performance
Remove uses of std::map.
Make sure we use ContentFeatures reference not value.
Original commit by gregorycu.
2016-10-04 00:06:28 +01:00
est31 fcfa418c4c Fix build/warning on non X11 platforms 2016-10-03 15:55:47 +02:00
rubenwardy 077b6cfa21 Formspec: Add container[] and container_end[] elements 2016-10-03 01:53:13 +01:00
sfan5 eb0e9d5661 Allow nothing to be selected from formspec parameters 2016-10-02 15:49:18 +02:00
paramat 56ea77ea96 Mgv7: Avoid mid-air spawn on disabled mountain terrain, optimise function
'getSpawnLevelAtPoint()' did not account for disabled mountains, it
was possible to be spawned in mid-air where a mountain surface would
have been.

Avoid check for river area if rivers are disabled.
2016-09-30 18:56:39 +01:00
est31 33a606c034 Fix android build
Fixes #4493.
2016-09-30 15:27:36 +02:00
sfan5 45a9145a4b Only include keycode unittests in client build (fixes #4559) 2016-09-29 16:31:31 +02:00
Jeija d973e4b40d Revert changes concerning blockwidth
Accounting for block width in the centrifugal force but then ignoring it for speed calculation actually
makes the game less realistic. On the other hand, applying blockwidth for speed calculation as well
(since planet speed / "visual units per seconds" != flat speed / "blocks per second") makes the game
almost unplayable (since movement is very slow high up and way to fast near the core). The best
compromise is to not care about block width at all and assume the planet just "scales" depending on the
player position.
2016-09-27 18:35:08 +02:00
Jeija 96adb16bc3 Planet: Fix gravity / centrifugal force by accounting for block height 2016-09-26 22:30:46 +02:00
sfan5 cc0b3c1cd1 Add keycode.cpp unittests 2016-09-25 17:26:38 +02:00
sfan5 c3e1ab859e Rewrite keycode.cpp (Keycode handling & names) 2016-09-25 17:26:38 +02:00
sfan5 af4c2107e0 Don't use ZLIB_WINAPI if the required DLL is not provided to CMake
This allows you to use an stdcall zlib (zlib1.dll instead of zlibwapi.dll)
when building Minetest for win32.
2016-09-21 20:16:31 +02:00
sfan5 3a57e52500 Do not serialize empty NodeMetadata
This commit fixes #4516, though note that this will gradually fix MapBlocks
as they are used/modified and thus re-serialized.
2016-09-21 10:29:17 +02:00
James Stevenson 679c8de63f Increase default font size by 1 2016-09-21 08:04:11 +02:00
paramat 3aefa5d3ce Register.lua: Throw error if node 'light_source' > core.LIGHT_MAX
Add 'core.LIGHT_MAX = 14' to builtin/game/constants.lua with the intention
to replace misplaced 'default.LIGHT_MAX = 14' in Minetest Game.
Add comment in light.h requiring the constant be changed in both places.
Add lighting bug warning to note in lua_api.txt.
There are hundreds of mod uses of 15 which causes a lighting bug.
2016-09-17 09:33:25 +01:00
Thomas--S 1475c1b1c8 Add an [invert:<mode> texture modifier
Inverts the given channels of the base image.
Mode may contain the characters "r", "g", "b", "a".
Only the channels that are mentioned in the mode string will be inverted.
2016-09-15 05:25:38 +01:00
ShadowNinja 6e30dd05f4 Collision: Improve performance by combining 6 vectors into 1 using a struct 2016-09-15 05:25:12 +01:00
paramat b88595050f Decorations: Generalise 'spawn by' to be used by all decoration types
In lua_api.txt, make clear that 'place on' and 'spawn by' can be lists.
2016-09-14 09:19:54 +01:00
sfan5 b77cee146b Allow escaping of texture names when passed as an argument to a modifier 2016-09-14 09:19:36 +01:00
Eric Mountain 9dd22aebc7 Fix "unknown CMake command "check_library_exists" (#4517)
Adds CMakeLists.txt include to fix this issue:

$ cmake . -DBUILD_SERVER=TRUE -DBUILD_CLIENT=FALSE \
   -DCMAKE_BUILD_TYPE=Release -DENABLE_CURL=TRUE -DENABLE_CURSES=FALSE \
   -DENABLE_FREETYPE=TRUE -DENABLE_GETTEXT=FALSE \
   -DENABLE_POSTGRESQL=FALSE -DENABLE_SOUND=FALSE -DENABLE_LUAJIT=TRUE \
   -DIRRLICHT_SOURCE_DIR=$HOME/irrlicht-1.8.4 -LH
...
CMake Error at src/CMakeLists.txt:339 (check_library_exists):
  Unknown CMake command "check_library_exists".
...
2016-09-13 23:05:21 -04:00
Auke Kok d83bcf2c50 Plantlike meshoptions: fix degrotate. (#4512)
This snuck in with the meshoptions patch and accidentally kills
degrotate plants. Thanks to @hybriddog for finding this.
2016-09-12 16:04:13 -07:00
Jeija 38bcb295e9 Make objects visible and active across planet edges
Disable anti-cheat by default. This caused issues for players crossing the planet edges in multiplayer.
2016-09-11 15:19:41 +02:00
Jeija f66044be43 Make objects fall through the planet and warp around the edges
Disable clouds by default
2016-09-10 20:32:06 +02:00
Jeija dd68d76216 Use planet shaders for objects, including wield items and players 2016-09-10 19:12:07 +02:00
James Stevenson 403dada85a Return nil on empty get_area() (#4508) 2016-09-10 01:47:13 +10:00
Jeija 493c6bc371 Planet: Fix gravity and centrifugal force for planet_keep_scale
Gravity / centrifugal force calculation didn't take into account that
the heights on a planet that preserves the aspect ratio of nodes is
actually different from just the y-coordinate, since the shader applies
the exponential function. The centrifugal force now also takes the width
of blocks into account (real speed = blocks per second * block width),
so that the force near the planet center and further up is now more
realistic.
2016-09-09 15:30:20 +02:00
Jeija 655f6f69a7 Adapt planet patches to to_string changes on master branch 2016-09-09 11:14:59 +02:00
Jeija 4759b81a37 Merge branch 'master' into sphere 2016-09-09 11:07:55 +02:00
Jeija 529455f437 Enable falling through the planet
Falling through the planet basically behaves like falling through a
torus with a hole. There are no special visuals to it, it's basically
just teleporting to the other side of the planet and reversing the
vertical velocity.
2016-09-09 11:04:42 +02:00
SmallJoker c0cd7aa351 Anticheat: Use the physics_override modifiers aswell 2016-09-09 01:03:36 -04:00
SmallJoker 2de8c22a99 Make getStackMax return the correct maximal stack size 2016-09-08 03:37:03 -04:00
paly2 aa33166386 Add minetest.unregister_item and minetest.register_alias_force 2016-09-08 03:26:52 -04:00
Rui 3b0f7659c7 Document keymap_autorun in settingtypes.txt and minetest.conf.example (#4486) 2016-08-30 05:40:48 +02:00
est31 1f2ff860f5 Update minetest.conf.example and settings_translation_file.cpp 2016-08-30 04:40:54 +02:00
rubenwardy 78ff5c1936 Fix background formspec elements from interfering with each other
Fixes #4397
2016-08-29 01:15:31 +01:00
rubenwardy e10fee0001 Allow fields to choose whether they close on enter press 2016-08-27 13:05:01 +01:00
rubenwardy 4330c63ea4 Submit name of field on enter key press 2016-08-27 13:02:45 +01:00