Commit Graph

6464 Commits

Author SHA1 Message Date
Loïc Blot af96309621 Gitlab-CI: keep build workspace only 1 hour 2017-04-24 16:06:27 +02:00
Loic Blot d7ddceac73
Fix lint since recent player to db merge 2017-04-23 16:22:53 +02:00
Loïc Blot 29ab20c272 Player data to Database (#5475)
* Player data to Database

Add player data into databases (SQLite3 & PG only)

PostgreSQL & SQLite: better POO Design for databases

Add --migrate-players argument to server + deprecation warning

* Remove players directory if empty
2017-04-23 14:35:08 +02:00
Loic Blot dda171d292
LINT fix 2017-04-23 10:24:00 +02:00
Loic Blot 485bf21998
Revert "CONTRIBUTING: disallow signed git commits"
This reverts commit 7a6502a7a5.

Signed commits are supported by PPA and weblate now
2017-04-23 10:21:08 +02:00
Loïc Blot 91a9382c25 Pass clang-format on various cpp/header files (#5559) 2017-04-23 09:52:40 +02:00
red-001 0c34fe20a1 Network:Remove old opcodes and fix documentation. (#5573) 2017-04-22 13:59:02 +02:00
paramat 4c03190ce8 Mgflat, Mgv7: Fix noise crash on world exit.
Fix crash caused by destructor 'delete' on noise objects that are not
created due to mapgen options.
Crash was caused by commit 57eaf62c69
2017-04-22 05:37:33 +01:00
Dániel Juhász f6d1b682d3 Add /fixlight chat command 2017-04-22 01:24:41 +01:00
paramat 57eaf62c69 Mgflat, Mgv7: Only create noise objects if needed 2017-04-22 01:24:03 +01:00
paramat 58c083f305 Sneak glitch: Set default to false
The 'sneak glitch' physics override now controls whether a player can
use the new move code replications of the old sneak side-effects:
sneak ladders and 2 node sneak jump. This completes our intention to
replicate the old sneak side-effects in new code and provide them as
an option that is disabled by default.
2017-04-22 01:23:57 +01:00
Auke Kok cca58fe0fd Add on_flood() callback.
This callback is called if a liquid definitely floods a non-air
node on the map. The callback arguments are (pos, oldnode, newnode)
and can return a `bool` value indicating whether flooding the
node should be cancelled (`return true` will prevent the node
from flooding).

Documentation is added, the callback function was tested with a
modified minetest_game.

Note that `return true` will likely cause the node's `on_flood()`
callback to be called every second until the node gets removed,
so care must be taken to prevent many callbacks from using this
return value. The current default liquid update interval is 1.0
seconds, which isn't unmanageable.

The larger aim of this patch is to remove the lava cooling ABM,
which is a significant cost to idle servers that have lava on their
map. This callback will be much more efficient.
2017-04-22 01:23:51 +01:00
Dániel Juhász 8464da7585 Fix a memory leak (#5636) 2017-04-22 00:55:07 +02:00
Loic Blot 3e71c8f482
Fixing warning pointed by @sfan5 and clang and cleanup guiFileSelectMenu
* Also pass clang-format on guiFileSelectMenu.h and remove it from whitelist
2017-04-22 00:51:56 +02:00
Loic Blot 4f4e2e3e83
Revert a const ref on update texture
if mod is a reference to a class member a variable swap breaks.
We should find a way to keep this const ref if possible.
Added a comment about this in header
2017-04-22 00:36:59 +02:00
Loïc Blot 113c85a66a lua: remove core.cause_error call (#5637)
it was used in minimal to trigger core crash, not very useful
2017-04-22 00:34:00 +02:00
Loïc Blot dc0e9097d3 Fix various performance issues reported by cppcheck + code style (CI) (#5635)
* Make CI happy with code style on master
* guiFileSelectMenu: remove useless includes
* some performance fixes pointed by cppcheck
* remove some useless casts
* TextDest: remove unused setFormSpec function
2017-04-21 23:40:48 +02:00
orwell96 f151b23220 Fix #5617 - respect message and reconnect parameters when shutting down immediately (#5621) 2017-04-21 19:31:59 +02:00
Dániel Juhász 900b816162 Fix after soft node overlays
This removes a segmentation fault and makes node meshes well colorized.
2017-04-21 19:18:09 +02:00
Dániel Juhász 1ffb180868 Soft node overlay (#5186)
This commit adds node overlays, which are tiles that are drawn on top of
other tiles.
2017-04-21 23:34:59 +10:00
Loïc Blot 2ad74a9e8b Gitlab-CI enhancements (#5629) 2017-04-21 10:22:20 +02:00
Loïc Blot 370354cc87 Fix various performance issues reported by cppcheck (#5628)
* Also remove 1 non declared but defined functions
2017-04-21 10:06:08 +02:00
Ekdohibs de5ecc9fa3 Run generate_from_settingtypes.lua 2017-04-20 06:06:15 +02:00
Dániel Juhász 57e5aa6628 Light update for map blocks
This is not really different from the light update of a voxel
manipulator. This update does not assume that the lighting was correct
before, therefore it is useful for correction.

Also expose this function to the Lua API for light correction, and
allow voxel manipulators not to update the light.
2017-04-20 05:39:14 +02:00
Dániel Juhász 6d1e6f8898 Split light update into two parts
The common part can be reused.
2017-04-20 05:31:50 +02:00
Loïc Blot f98bbe193e Fix various copy instead of const ref reported by cppcheck (part 3) (#5616)
* Also remove 2 non declared but defined functions
* Make some functions around const ref changes const
2017-04-20 00:12:52 +02:00
Loïc Blot f3fe62a0bf Fix various copy instead of const ref reported by cppcheck (#5615)
* Also remove InventoryList::peekItem unused function
* Fix some post increment to preincrement reported by cppcheck
2017-04-19 23:02:07 +02:00
paramat cfe0291b13 Conf.example: Move some lines to minetest.conf.example.extra
Some information in conf.example cannot be generated from
settingtypes.txt, moving it to a new file makes generating
conf.example while preserving that information easier.

Regenerate conf.example from settingtypes.txt.
2017-04-19 02:02:11 +01:00
MarkuBu efd509f796 Pointed thing to face pos: Fix crash if opening door with slab or stair
Avoids crash caused when 'pointed thing -under' and '-above' are not
face-neighbours, for example in the case of pointing to the top half
of a door.
2017-04-19 02:01:42 +01:00
Hybrid Dog 858c722974 Tools: Fix tool digging speed limit 2017-04-19 02:01:15 +01:00
Loïc Blot cf37a55690 Fix various variables passed by copy instead of const ref (#5610)
Pointed by cppcheck
2017-04-19 00:36:30 +02:00
Loïc Blot 5f2af7c4e8 Fix broken lint since 04cc9de8f2 2017-04-18 17:13:50 +02:00
Auke Kok 93c1d511e3 Reorder TileSpec. (#5591)
Put accessed members that are needed by updateFastFaceRow()
all in the same cacheline.
2017-04-18 07:48:17 +02:00
Ekdohibs eddf16eee9 Fix always using the xbox layout (reported by coverity). 2017-04-18 06:47:08 +02:00
Auke Kok 5433e9bd19 Don't make TAB exit game if bound to inventory.
I play with the TAB key bound to the inventory. However, the
code here assumes that TAB means "close formspec" in all contexts,
including the main menu. This causes my game to exit when I attempt
to TAB in between USERNAME and PASSWORD fields.

We know when m_client != NULL that the game is a client game and
not in the main menu, and then it's OK to use the INVENTORY bound
key to exit the formspec, since it's not the main menu.
2017-04-17 21:45:40 -07:00
SmallJoker 6120251320 Fix MSVC build broken by 34d32ce
`round` -> `myround`
Remove superflous `floor` calls
2017-04-17 14:02:26 +02:00
Perttu Ahola 04cc9de8f2 MeshUpdateQueue: Add a MapBlock cache that minimizes the amount of MapBlock copying done in the main thread
Cache size is configurable by the meshgen_block_cache_size (default 20 MB).

New profiler stats:
- MeshUpdateQueue MapBlock cache hit %
- MeshUpdateQueue MapBlock cache size kB

Removes one type of stutter that was seen on the client when received MapBlocks
were being handled. (the "MeshMakeData::fill" stutter)

Kind of related to at least #5239

Originally preceded by these commits, now includes them:
- Move the mesh generator thread into src/mesh_generator_thread.{cpp,h}
- mesh_generator_thread.cpp: Update code style
- MeshUpdateThread: Modify interface to house a different implementation: Actual functionality will be changed by next commits.
- MeshMakeData: Add fillBlockData() interface (so that caller can fill in stuff from eg. a MapBlock cache)
2017-04-17 14:58:29 +03:00
Perttu Ahola 4323ad163f Include container.h in util/thread.h. util/thread.h doesn't compile without it 2017-04-17 14:58:29 +03:00
paramat f6da7b3fda Sneak: Add option for old move code
Temporary option for the old move code for specific old sneak behaviour.
Enabled by setting the added 'new move' physics override to false.
By default 'new move' is true.
2017-04-17 10:13:05 +01:00
Loic Blot 907be0ab91
Remove an unused variable in Android Build 2017-04-17 09:37:12 +02:00
Auke Kok 97988a1044 Plug two minor Leaks (#5603)
* Resource leak: CHECK_FILE_ERR returns, without freeing chunk_name.

Found with static analysis.

* Resource leak: leaks `page` on error path.

Found with static analysis.
2017-04-17 09:04:58 +02:00
Loïc Blot 73de17afa8 Android progressbar fix (#5601)
* Fix progressbar for Android

Fixes #5599
Fixed #5403 

* draw_load_screen: use texturesource
  this permits to unify texture loading code
* scale progress bar

* Add gl version check for GL_OES_texture_npot. This fixed the texture on loading screen

* Remove two sanity checks pointed by @celeron55

* sfan5 comments + android ratio fixes
2017-04-16 14:44:15 +02:00
Nathanaël Courant d17636484d Disable android leveldb by default (#5596)
1) Now leveldb is brick (thanks google)
2) By default, use SQLite3, this work perfectly and NOBODY not use LevelDB on Android :)
2017-04-16 09:48:48 +02:00
Loïc Blot 34d32ce55a Implement delayed server shutdown with cancelation (#4664) 2017-04-15 23:19:18 +02:00
SmallJoker 0f955bf7fa Minimap: Do a double-typecast to fix compiling with MSVC 2017-04-15 14:30:27 +02:00
Loïc Blot a9aad4d061 Partial damage cheat fix: node damages server side (#4981)
* Damage cheat fix: server side

* Lava/Node damages overtime server side
* lava hurt interval is only for old protocol
2017-04-15 09:25:43 +02:00
Loic Blot b1e6c2a9b8
NetworkPacket: don't copy push std::string and std::wstring 2017-04-14 18:26:24 +02:00
Loic Blot 093e621643
Fix wrong channel type in Client/Server CommandFactories
This is a u8 not a u16
2017-04-14 15:56:40 +02:00
Loïc Blot b0be7ab61e ClientIface::sendToAll: honor packet configuration (#5590) 2017-04-14 15:34:01 +02:00
Loic Blot 98286a24bc
Fix android build 2017-04-14 09:26:11 +02:00