Commit Graph

6635 Commits

Author SHA1 Message Date
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 04cc9de8f2fbcb11f133c88f02fc11504b3ea6f3 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
bigfoot547
e80a83d1cb [CSM] Add function to set minimap shape (#5569)
* [CSM] Add function to set minimap shape

Also deprecates `toggle_shape`.

* Oh fish, I messed that one up!

* Fix Style

* Sorry, I missed something

I still had the `luamethod` call in there!

* Add getters

* Remove extra line

* Remove useless variable

Please review again @nerzhul . Thanks!

* Satisfy nerzhul
2017-04-14 09:04:41 +02:00
Dániel Juhász
6f641df8a5 Only use palette if param_type2 is correct 2017-04-13 09:52:48 -07:00
Dániel Juhász
021e667511 Add documentation for map block format 27 (#5576) 2017-04-13 10:19:46 +02:00
Vincent Glize
8bdf9a44c6 [CSM] Fix localplayer documentation (#5557) 2017-04-12 23:05:01 +02:00
numberZero
83508277ce Fix inability to change metadata using stack:to_table() (#5547) 2017-04-12 16:51:07 +02:00
Loic Blot
1399678ffd
Fix fips_cipher_abort warning and other duplicate macros 2017-04-12 09:06:26 +02:00
red-001
4e2479e46a [CSM] Allow escaping chatcommands and add missing calls to gettext. (#5565) 2017-04-11 23:35:25 +02:00
t0ny2
a3e7372686 Replace occurrence of luaL_reg in l_localplayer (#5566)
Related to commit 41c5483. Replace a final occurrence of luaL_reg in
src/script/lua_api/l_localplayer.cpp
2017-04-11 19:29:24 +02:00
paramat
59911761ef Sneak glitch: Detect ledge for 2-node climb-up
Re-creates the old sneak-jump behaviour in new code.
Enabled by the 'sneak glitch' physics override.
When a ledge is detected the jump speed modifier is set to the larger
of 'physics override jump' and 1.3 to allow a 2-node climb-up.

An unexpected side-effect is the simple sneak ladder working smoothly.
2017-04-11 05:41:13 +01:00
red-001
eb587996e4 [CSM] Use more gettext (#5553) 2017-04-10 21:14:00 +02:00
red-001
e8d8723320 [CSM] Move .list_players and .disconnect to builtin. (#5550) 2017-04-10 21:13:20 +02:00
Loïc Blot
0bc306e337 Clang-format fix for Android 2017-04-10 09:40:06 +02:00
Loïc Blot
b4106ca58f Clang-format styles fixes since previous commit 2017-04-10 09:17:53 +02:00
Loic Blot
0419552c92
Clang format: fix LINT on old PR which doesn't have LINT enabled 2017-04-10 08:05:03 +02:00
number Zero
0a8834608d Hard-coded undersampling.
Adds uniform undersampling for the 3D rendered scene. GUI elements
are not undersampled, resulting in better playability for users
with low-performance platforms with readable fonts and formspecs.

The undersampling setting can be set to 0 (disabled), 2, 3, 4 pixels
which translates into a resolution reduction of x4, x9 or x16, and
is significant.
2017-04-09 17:30:19 -07:00
Vincent Glize
8ad3dad137 LocalPlayer api lua 2017-04-08 22:04:30 -07:00
Dániel Juhász
58d83a7bb2 Hardware coloring for itemstacks
Adds the possibility to colorize item stacks based on their metadata.

In the item/node definition you can specify palette (an image file)
and color (fallback color if the item has no palette or metadata).
Then you can add palette_index to the metadata.

Dropped itemstacks with different colors do not merge.
2017-04-08 18:39:15 -07:00
red-001
d4e9dd4643 Move chat command handling code from C++ to Lua (#5528) 2017-04-08 20:03:57 +02:00
raymoo
fb4c730708 Document that write_json will error on unserializable types. (#5539)
Previously it was erroneously documented that it would save them as null.
2017-04-08 10:42:59 +02:00
Loïc Blot
8c8333bf68 Prepare for Linux daily build packages (using Gitlab.com CI) (#5542)
* Prepare for Linux daily build packages (using Gitlab.com CI)
2017-04-08 10:19:07 +02:00
Loïc Blot
41c5483024 Replace luaL_reg with luaL_Reg as recent LuaJIT dropped the Lua 5.0 compat (#5541)
We are bundling Lua5.1 which has same macro
2017-04-08 09:28:37 +02:00
Loic Blot
01f9d05f23
code style fix on src/script/cpp_api/s_client.h 2017-04-08 08:45:58 +02:00
Vincent Glize
f73534640a [CSM] Add event on_connect player API lua (#5540)
* Add event on_connect player API lua
2017-04-08 08:20:30 +02:00
Loic Blot
ff4fef570e
Fix cmake library default build problem since moving to lib/
Also make Lua library check a cmake module
2017-04-07 23:56:02 +02:00
Loic Blot
4af99b75cf
Pass clang-format on 14 trivial header files fixes
Also remove them from whitelist
2017-04-07 23:22:00 +02:00
rubenwardy
271d7c31e6 Fix signed/unsigned conversion warning
There was no bug here (as I checked for negativeness),
however it's good to get rid of warnings.
2017-04-07 19:06:50 +01:00
SmallJoker
c28a843592 Cavegen: Fix non-constant array initializer error for MSVC 2017-04-07 17:59:27 +02:00
SmallJoker
71ffe699d0 Settings: Update documentation (#5534)
Now documented (sorted a-z):
enable_console
enable_particles
creative_mode
hud_scaling
inventory_image_hack
keymap_console
keymap_zoom
shader_path
view_bobbing
2017-04-07 17:10:26 +02:00
Loic Blot
f7088f69ab
Clang-format: fix some header files and remove them from whitelist 2017-04-07 08:50:17 +02:00