Commit Graph

5280 Commits

Author SHA1 Message Date
Lars Hofhansl 25cc5d1a32 Optimize ABM checks.
See #7555

Cache (up to 64) node types for each active block.
Check this cache first to see whether any ABM needs to be triggered for a block.
2018-07-21 03:09:39 -07:00
Paramat 4b36a39d37
CSM: Disallow exploitable clientside mod functions by default (#7547) 2018-07-19 03:58:48 +01:00
Paramat bc9bb63aed
Mgvalleys: Make river depth variation and humidity drop optional (#7532)
Add 2 new mapgen flags to make river depth variation and humidity drop
with altitude independently optional, instead of both being enabled by
the 'humid rivers' flag.

Simplify and clarify related code by removing a low priority
optimisation regarding 't_heat'.
Remove unnecessary optimisation bools and use spflags directly instead.
Improve and fix documentation in settingtypes.txt.
A few minor code cleanups.
2018-07-18 03:34:05 +01:00
Lars Hofhansl ca8ec46843 Remove legacy client handling code. 2018-07-14 11:41:05 -07:00
Paramat b38c121856
Make player liquid speed independent of FPS (#7543)
Make player liquid speed independent of FPS.
Fix codestyle issues in code block.
2018-07-14 18:41:26 +01:00
lhofhansl a95aed8800 Adjust some settings to modern environments and networks. (#7549) 2018-07-13 22:11:49 +02:00
Lars Hofhansl 8d629cf65b Fix bug setting channel window size. 2018-07-13 05:02:08 -07:00
Lars Hofhansl 93c0b3b8fb Ensure that legacy mode is correctly disabled. 2018-07-13 02:50:01 -07:00
Lars Hofhansl ba7cf30df9 Reduce block load glitches
See #7542
This reduces glitches in deep water and underground caves.
2018-07-12 00:54:00 -07:00
Muhammad Rifqi Priyo Susanto 7ebc229b0d Android: Add 'aux' button (#7477)
Add 'aux' button.
Use joystick to trigger 'aux' button when forward and out of main circle, by enabling
'virtual_joystick_triggers_aux' setting.
2018-07-10 23:33:40 +01:00
SmallJoker f7a8e75765 Formspecs: Remove accidental empty 'quit' field 2018-07-10 18:27:03 +02:00
Loïc Blot a61e1a4dbc
Lua templating reading (part 4): s16, v2s16, v2f (#7512) 2018-07-08 23:06:33 +02:00
lhofhansl 94cd2bfeac Revert 6587 - Optimize entity-entity collision (#7539) 2018-07-08 21:30:55 +01:00
HybridDog 53dd781927 Fix memory leak in guiConfirmRegistration 2018-07-06 11:13:18 +02:00
lhofhansl 03edcafdda Zoom: Correctly verify client passed zoom at the server (#7526)
Fixes generation of distant world when not zooming in creative mode
(in creative mode zoom FOV is 15 degrees).
2018-07-03 00:16:17 +01:00
Loic Blot 1ff15d3a46
Drop ClientEvent CEE_PLAYER_BREATH: triggering function is not called.
Also drop 3 useless IntervalLimiter
2018-07-01 13:47:57 +02:00
SmallJoker 49509d2f74
Log deprecated Lua function calls (#7491) 2018-07-01 12:31:49 +02:00
SmallJoker 6f22d14206
Make the server status message customizable (#7357)
Remove now redundant setting show_statusline_on_connect
Improve documentation of `minetest.get_server_status`
2018-07-01 12:31:28 +02:00
Muhammad Rifqi Priyo Susanto ad3d1d20d1 Android: Resize jump and sneak buttons' touch target (#7498) 2018-06-30 22:33:14 +01:00
Loïc Blot eef62c82a2
Modernize lua read (part 2 & 3): C++ templating assurance (#7410)
* Modernize lua read (part 2 & 3): C++ templating assurance

Implement the boolean reader
Implement the string reader
Also remove unused & unimplemented script_error_handler
Add a reader with default value
2018-06-30 17:11:38 +02:00
red-001 227c71eb76 Fix memory leaks in mod storage (#7500) 2018-06-30 17:11:04 +02:00
Vitaliy 9f19b7d936 Fix world deletion (#7494)
* Fix world deletion
2018-06-30 15:13:53 +02:00
Loic Blot d7f873bc8d
Fix a memleak before assertion in l_get_mod_storage 2018-06-30 10:32:02 +02:00
red-001 e36af6f969 Fix mod channels crash (#7481) 2018-06-27 17:45:40 +02:00
red-001 a43a4e2d97 Fix small memory leaks in client. (#7492) 2018-06-27 17:06:37 +02:00
Paramat 93661ca212
Cavegen: Fix errors when getting biome outside mapchunk (#7480)
Some cave segments are outside the mapchunk.

Previously, biome was being calculated by a function that uses the noise
maps. Points outside the mapchunk resulted in incorrect noise map indexes
that were sometimes outside the noise map size, causing a crash.

Use either noise maps or point noise calculations depending on point
location.
2018-06-26 19:35:23 +01:00
SmallJoker b589352e79 Update settings translations 2018-06-26 15:38:42 +02:00
SmallJoker db42542e27 Rename CSM flavours to restrictions
& Satisfy LINT
2018-06-26 15:38:42 +02:00
red-001 7bdf5eae05 Fix buffer overrun in SRP (#7484)
The old code got a pointer to the array instead of the first element, this resulted in a buffer overflow when the function was used more than once.
2018-06-26 10:02:26 +02:00
sfan5 b298b0339c Fix MurmurHash implementation to really be unaligned (#7482) 2018-06-26 00:12:09 +01:00
Paramat de621d5d4b
Decoration API: Add lightweight ability to have complete coverage (#7456)
When the noise value or fill_ratio >= 10.0 complete coverage is enabled.
This disables random placement to avoid redundant multiple placements
at one position. Instead, 1 decoration per surface node is placed by
looping across each division.

'10' was chosen as this is the fill_ratio that previously created
very near complete coverage. The complete coverage feature therefore
integrates smoothly when noise is used for variable decoration density.

'fill_ratio = 10' should be used by modders who want a decoration
placed on every surface node. Compared to before such a decoration
placement will be 10 times faster.
2018-06-24 17:14:18 +01:00
SmallJoker 1d1cf000c0 Fix rtt >= 0.0f assertion and free_move crash 2018-06-24 14:48:19 +02:00
stujones11 6b72d8d090 Android: Use correct temporary path (#7463) 2018-06-23 22:38:19 +02:00
you 968ce9af59 RTT fixes (#7428)
* Few code updates

* Do not show average RTT before timing out

* Fix unwanted integer division in RTTStatistics

* Fix float format, prettier jitter calculation

* Use +=, 0.1f -> 100.0f for stronger average updates
2018-06-23 09:16:01 +02:00
red-001 07b1743d3d Fix crash caused by Lua error during startup (#7473) 2018-06-22 21:04:41 +02:00
sfan5 c66d977269 Fix ipv6_server=true not accepting IPv4 connections on Windows (#7471) 2018-06-22 20:54:23 +02:00
Paramat 8d3190e77a
Biome API: Fix absent water decorations and dust, in deep water (#7470)
Previously, the biomemap was 'BIOME_NONE' for a mapchunk column if a
stone surface was not found in it, causing water surface decorations
and water surface dust to fail.

Store the biome ID of the biome calculated at a water surface and add
it to the biomemap if the biomemap is 'BIOME_NONE' for the mapchunk
column. The biome calculated at a stone surface still has priority
for the biomemap entry, as it should.

Edit an incorrect comment.
2018-06-21 19:28:54 +01:00
Paramat 86389329eb
Biome dust: Revert fix that added dust to mod structures (#7464)
Revert commit 99143f4947 and commit
f4ca830abe.

These commits caused biome dust to be applied even when there was no core
mapgen terrain in a mapchunk column. So the dust, which overgenerates,
then appeared on structures added by mods in 'on_generated', such as
floatlands, asteroids or above-surface realms.
2018-06-19 22:09:42 +01:00
rubenwardy ca502fc274
Update to new ContentDB API 2018-06-18 20:47:38 +01:00
thoughtjigs 3d516079eb Provide Xorg/net wm process ID (#7445)
Adding support for _NET_WM_PID as defined in Extended Window Manager Hints
Move verbose messaging to setupXorgTopLevelWindow method as Xorg messages should only occur when running in Xorg env.
Irrlicht returns the XDisplay as a void* and XWindow as an unsigned long so reinterpret those as the appropriate type. Also fixed a spaces for tab formating issue
2018-06-17 10:41:07 +02:00
Loic Blot 2bec28f462
Remove Server::m_ignore_map_edit_events (noop) 2018-06-15 08:41:50 +02:00
Loïc Blot 9a1d3584c2
Server: move shutdown parts to a specific shutdown state object (#7437)
* Server: move shutdown parts to a specific shutdown state object
2018-06-13 21:58:34 +02:00
SmallJoker 409d04324f Fix the /shutdown command (#7431) 2018-06-11 13:43:12 +02:00
number Zero 2c0d8b25dd Fix narrow/utf8 difference in incoming/outcoming messages 2018-06-10 10:33:53 +02:00
Paramat 0b23253447
Mapgen flags: Add 'biomes' global mapgen flag (#7355)
Previously the only way to disable biomes was to 'clear' the registered
biomes in a mod, but this method causes large amounts of unnecessary
processing:
1. Calculation of 4 2D noises.
2. Looping through all nodes of a mapchunk replacing nodes with identical
nodes.
The new flag disables those operations.
2018-06-08 23:24:36 +01:00
tukkek 9f8582dcdf Stop autoforward on BACKWARD key-press (#7417) 2018-06-06 14:31:34 +02:00
Loïc Blot ccc3af128c
CSM/SSM: Add on_mods_loaded callback (#7411)
* CSM/SSM: Add on_mods_loaded callback
2018-06-06 12:53:59 +02:00
Wuzzy 35bc3e2f17 Set ENABLE_GETTEXT to TRUE by default (#7415) 2018-06-05 23:02:14 +02:00
Loïc Blot 180e551c56
Modernize lua read (part 1): C++ templating insurance (#7394)
* Modernize lua read (part 1): C++ templating assurance

Implement the float reader
2018-06-04 22:38:07 +02:00
Paramat 86b19f2849
Biome dust placement: Improve comments, re-order some lines 2018-06-04 00:39:10 +01:00