Commit Graph

6389 Commits

Author SHA1 Message Date
Maksim
62ae7adab2
Android: add Android Studio support, completely redone java part (#9066) 2020-04-15 16:27:40 +02:00
sfan5
8ae8c1600a
Fix parsing JSON with large integers (#9674) 2020-04-15 08:01:28 +02:00
Loïc Blot
5c588f89e7
Verify database connection on interval (#9665) 2020-04-15 08:01:11 +02:00
sfan5
2d5bd3bf79
scriptapi: Some small optimizations to value pushing (#9669) 2020-04-14 20:44:18 +02:00
SmallJoker
7c43cf47c3 PostgreSQL: Fix listAllLoadableBlocks returning the same block
Suggested change from https://github.com/minetest/minetest/issues/9670#issuecomment-613563738
2020-04-14 20:42:40 +02:00
Hugues Ross
5cf6318117
Refactor texture overrides and add new features (#9600)
* Refactor texture overrides, and add new features:

- Texture overrides can support multiple targets in one line
- Texture override files can have comment lines
- Item images/wield images can be overridden

* Formatting changes

* Address soime feedback

- Pass vectors by const reference
- Log syntax errors as warnings
- Remove 'C' prefix from TextureOverrideSource

* Simplify override target checks with an inline helper function

* make linter happy

* Apply feedback suggestions

Co-Authored-By: rubenwardy <rw@rubenwardy.com>

* Remove remaining != 0 checks

* Update copyright notice

Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: rubenwardy <rw@rubenwardy.com>
2020-04-14 20:41:29 +02:00
Wuzzy
7e21b3cd48
Remove sound menu and show proper msgs if sound is off (#9069) 2020-04-13 20:26:54 +02:00
DS
0ac999ded7
Add scroll_container formspec element (redo) (#9101)
New formspec elements:

 - `scroll_container[<X>,<Y>;<W>,<H>;<scrollbar name>;<orientation>;<scroll factor>]`
 - `scroll_container_end[]`

Other elements can be embedded in this element. Scrollbar must be placed manually.
2020-04-13 10:50:07 +02:00
SmallJoker
6cf15cf872
GUIFormSpecMenu: Add basic element highlighing debug feature (#9423)
Activated using F5
2020-04-12 12:02:32 +02:00
Wuzzy
a24d3b3600
Play 'player_jump' when player jumps (#9373) 2020-04-12 00:50:40 +01:00
Lars Müller
af2e6a6a10
Improve waypoints and add image variant (#9480) 2020-04-11 22:09:46 +01:00
Hugues Ross
f780bae05c
Formspecs: Add state-selection to style elements (#9378) 2020-04-11 21:39:30 +01:00
sfan5
ba3587e776 Fix broken config check in 659245a 2020-04-11 21:29:57 +02:00
sfan5
40df3931d8
Implement DPI scaling for Windows (#9586) 2020-04-11 20:03:59 +02:00
Loïc Blot
5cc06e4748
Reduce ServerEnvironment propagation (#9642)
ServerEnvironment is a huge class with many accessors. In various places it's not needed

Remove it to reduce the ServerEnvironment view.

Idea here is to reduce size of some of our objects to transport lightweight managers and permit easier testing

Pathfinder is now tied to a generic map, not a ServerMap, it can be
ported to client
2020-04-11 19:59:43 +02:00
Loic Blot
5146086a64 Drop content_sao.{cpp,h}
Move LuaEntitySAO to a new dedicated file
Drop TestSAO (useless object)
Drop the old static startup initialized SAO factory, which was pretty useless.
This factory was using a std::map for 2 elements, now just use a simple condition owned by ServerEnvironment, which will be lightweight, that will also drop a one time useful test on each LuaEntitySAO creation. This should reduce server load on massive SAO creation
2020-04-11 16:07:17 +02:00
Loic Blot
894a34aef4 Move PlayerSAO to dedicated files 2020-04-11 16:07:17 +02:00
Loic Blot
c99e8df07f pass clang-format 2020-04-11 16:07:17 +02:00
Loic Blot
6d43736172 Move serveractiveobject & unitsao
Move serverobject.{cpp,h} to server/serveractiveobject.{cpp,h}
Move UnitSAO class to dedicated files
2020-04-11 16:07:17 +02:00
SmallJoker
01b3f26c7b Formspec: No spec ID for static text labels
Fixes #9634
2020-04-11 15:31:02 +02:00
Alex
fbf74dc524
Use TILE_MATERIAL_ALPHA for use_texture_alpha entity flag (#9639)
Fixes #9637.
2020-04-11 13:45:14 +02:00
sfan5
1292bdbbce Various features and fixes 2020-04-11 13:12:51 +02:00
sfan5
5f3a17eb65 Implement minetest.sound_fade() 2020-04-11 13:12:51 +02:00
sfan5
054c5dfaa3 scriptapi: Sort out ServerEnvironment / Environment distinction properly
The API implementation is shared between CSM and SSM.
Functions should retrieve a plain env when they do not
need any server-specific functions.
2020-04-11 13:12:51 +02:00
sfan5
f105bc8dc2 A few initialization cleanups 2020-04-11 13:12:51 +02:00
Wuzzy
aa3cf400e2
Print error if invalid mapgen alias was detected (#9579) 2020-04-10 20:36:16 +02:00
Loïc Blot
35e778ee9f
Move clientsimpleobject.h to client folder (#9630)
This file is only called from client folder, retrieve its friends :)
2020-04-10 20:10:51 +02:00
Loïc Blot
f648fb76ae
Drop genericobject.{cpp,h} (#9629)
* Drop genericobject.{cpp,h}

This file is not for generic object but for ActiveObject message passing.
Put ownership of the various commands to the right objects and cleanup the related code.

* Protect ServerActiveObject::m_messages_out

* typo fix
2020-04-10 19:49:20 +02:00
TheTermos
3ad5388c6d
Collision various fixes (#9343) 2020-04-08 22:45:05 +02:00
sfan5
659245acc7
Work around LuaJIT issues on aarch64 (#9614)
- Move the text segment below the 47-bit limit, needed for script_exception_wrapper which must be lightuserdata
- Replace CUSTOM_RIDX_SCRIPTAPI with full userdata
2020-04-08 20:14:08 +02:00
sfan5
de73f989eb
Overall improvements to log messages (#9598)
Hide some unnecessarily verbose ones behind --trace or disable them entirely.
Remove duplicate ones. Improve their contents in some places.
2020-04-08 20:13:23 +02:00
sfan5
3494475df1
Miscellaneous networking improvements (#9611)
fixes #2862
2020-04-08 20:12:58 +02:00
Hugo Locurcio
f45ba78a72
Allow relative directories for screenshot_path, tweak default path (#9122)
This will likely be more intuitive for users and should play better
with sandboxed distributions such as Flatpak.

In addition, the screenshot directory will now be created if it doesn't
exist already.
2020-04-06 16:54:12 +02:00
Pierre-Yves Rollo
0eb3072819
Hypertext: Fix hovercolor not working in global tag (#9582) 2020-04-05 15:04:41 +02:00
SmallJoker
d5c4412536
Revert collision tweaks #9365 and #9327 (#9591)
This reverts commit df74d369a395f0b99bd23fa3e7fb4c628c3df336.
This reverts commit 908e76247922d4adf879b3996c4f75bdbb4e536d.

Restores the original collision detection bugs to release 5.2.0 prior the large collision detection fix.
2020-04-04 21:27:23 +02:00
Pierre-Yves Rollo
86a0e991ef
Fix cursor still visible after closing formspec while on HyperText (#9583) 2020-04-04 16:17:15 +02:00
LNJ
307d7376cf
Fix 'the the' typos in comments (#9554) 2020-04-04 15:52:41 +02:00
updatepo.sh
6940e5a191 Update minetest.conf.example, settings_translation_file.cpp 2020-04-03 23:19:36 +02:00
Elias Åström
3d6b55d3e9
Fix texture distortion for flowing liquids (#9561)
Previously textures of the side faces on flowing liquid nodes would
become distorted on different axis depending on the liquid level.  This
is because the nodes always had the same texture coordinates, even when
the generated face could have different sizes.  This solves that problem
by adjusting the texture coordinates for the vertices making up the top
of the faces, so the textures will not look compressed for smaller
faces.
2020-04-02 19:24:35 +02:00
DS
d7825bca1b
Fix GUI element click-through by changing visibility (#9534)
This adds a vector that holds pointers to elements that should only be visible while being drawn.

In the guifsmenu's draw func, all elements in this vector are made visible and invisible again. Apart from there, they are always invisible. (Well they are still visible before the first drawn, does this matter? If yes, it could be fixed easily with some lines of code everywhere.)
2020-03-31 18:34:42 +01:00
ANAND
13b228513e
Ignore near_plane setting on non-Android platforms (#8749)
Camera's near-plane will be hard-coded to 0.1 on all non-Android platforms. The upper-bound of this setting has been reduced to 0.25, as 0.5 is just way too high.
2020-03-28 21:53:55 +01:00
sfan5
04961491c1 Fix crash on wielditem/item entities
bug was introduced in f3032a637c53f3c98fbbed1d3b691898aabe1687
2020-03-28 12:56:48 +01:00
Pierre-Yves Rollo
49a558574f
Hypertext: Fix alignment tags adding unwanted newlines (#9548) 2020-03-26 19:56:35 +01:00
SmallJoker
a0998754a7
Connection: Fix deadlock in debug mode (#9550) 2020-03-26 19:13:50 +01:00
Danila Shutov
f3032a637c
Fix incorrect light updates for wielditem and item visuals (#9540)
An alternative to #9537
2020-03-23 21:57:44 +01:00
Wuzzy
625b100593
Add comments for translators (#9510)
* Add translator comments for "special" strings

* Add translator comments for some "tricky" strings
2020-03-20 09:41:07 +01:00
Danila Shutov
5c1b72544a
Fix entity lighting (#9514)
fixes #9482
2020-03-16 22:58:13 +01:00
sfan5
5a31d56c9f Fix mouse events sent to wrong GUI elements when dragging 2020-03-16 22:57:10 +01:00
v-rob
13ad8e2a09
Formspecs: Add starting frame to animated_image (#9411) 2020-03-16 22:56:48 +01:00
SmallJoker
766d160ffb guiHyperText: Fix blinky cursor on link hover (#9392)
Change legacy size/position calculations to 'textarea'
2020-03-11 19:09:50 +01:00
HybridDog
fd4daefb29
minetest.get_content_id: error if the node does not exist (#9458)
If a mod creator makes a typing mistake, this function now causes an error instead of returning the id of "ignore".
2020-03-11 16:25:14 +01:00
DS
b42493fb4c
Fix memory leak in GUIHyperText (#9489) 2020-03-10 20:32:38 +01:00
sfan5
7a7bfdca7c
minetest,get_connected_players: Return empty table at load time (#9493) 2020-03-10 20:32:04 +01:00
SmallJoker
7da4f9ef20
GUIFormSpecMenu: Remove field_close_on_enter warning (#9501) 2020-03-10 20:30:55 +01:00
Nicolas Abril
30d795b4b2
Remove unnecessary checks before delete (#9500)
Co-authored-by: Nicolas Abril <nicolasabril@alunos.utfpr.edu.br>
2020-03-10 20:30:42 +01:00
Maksim
0cb34ce158
Fix 2 log messages when player joined to game (#9477) 2020-03-08 18:24:32 +01:00
Jean-Patrick Guerrero
c49575ef97
Improve arm physics (#9485) 2020-03-08 18:21:55 +01:00
Jordan Snelling
b9a0626d88
Fix star visilibity and documentation (since 946c03c6)
Fix memory leak (unused allocation)
Fix star rendering
Rename sky color struct
Fix stars on android
Remove extraneous .data() from android star draw
2020-03-08 16:13:36 +01:00
SmallJoker
23c907befe Workaround for get_player_information
'-1' as value is handled as an error. If there are no RTT updates upon fast connect, set_player_information returned nil.
2020-03-08 13:21:15 +01:00
Jean-Patrick Guerrero
0e88176db8
GUIHyperText: Fix bug with UTF8 chars in action name + simplify UTF8 stringw conversion (#9437)
Co-authored-by: Pierre-Yves Rollo <dev@pyrollo.com>
2020-03-07 14:01:11 +01:00
sfan5
9ca0b3739c
Fix memory leak in protocol 38 set_sky 2020-03-05 22:36:21 +01:00
sfan5
db95ff2286 Fix linking failures when compiled with Clang 9 2020-03-05 22:05:18 +01:00
sfan5
e774d8ca2f Fixes around ServerActiveObject on_punch handling 2020-03-05 22:04:23 +01:00
sfan5
ef09e8a4d6 Fix code style to make clang-format happy 2020-03-05 20:55:29 +01:00
Jordach
946c03c69b set_sky improvements, set_sun, set_moon and set_stars 2020-03-05 20:12:19 +01:00
Wuzzy
580e7e8eb9 Fix pathfinder bugs: returning nil frequently, broken A*, jump through solid nodes (#9339)
* Fix pathfinder fail when startpos is over air
* Note down pathfinder restrictions
* Implement real A* search
* Pathfinder: Implement buildPath non-recursively
* Update find_path documentation
* Pathfinder: Check if jump path is unobstructed
* Pathfinder: Fix drop check first checking upwards
* Pathfinder: Return nil if source or dest are solid
* Pathfinder: Use priority queue for open list
2020-03-05 12:09:44 +01:00
sfan5
6d8e2d2483 Fix core.get_player_by_name() returning unusable ObjectRef
Followup to the previous commit.
2020-03-03 21:21:41 +01:00
sfan5
1761d7d0f8 Fix core.get_connected_players() returning unusable ObjectRefs
This bug is only exposed by 91eef646a59575bd9ae792e257bb6ad12fafc0b1
independent of the move of get_connected_players from Lua to C++.
Previously, there would be a small time window where the SAO had
its peer ID set to PEER_ID_INEXISTENT but the RemotePlayer was
still linked to the SAO, resulting in an ObjectRef that crashed
on certain function calls (#9387).
2020-03-03 21:21:41 +01:00
v-rob
7dffd08c1a
Add multiple element selection to style and style_type (#9380) 2020-03-01 14:39:57 +00:00
DS
0c08f948d7
GUIInventoryList: fix dropping items when clicking outside of formspec window (#9422) 2020-02-26 12:18:05 +01:00
Warr1024
244121b964
Allow texture modifiers in hotbar textures. (#9271) 2020-02-26 10:26:24 +01:00
sfan5
e2fc93022b Fix potential problem with core.get_connected_players() 2020-02-25 16:08:47 +01:00
sfan5
0b8d3f99a5 Move core.get_connected_players() implementation to C++
Keeping the ObjectRefs around in a table isn't ideal and this allows
removing the somewhat nonsensical is_player_connected() added in 86ef7147.
2020-02-23 22:24:12 +01:00
sfan5
c657fb343f Refactor Script API's log_deprecated 2020-02-23 22:24:12 +01:00
sfan5
4da057cc49 Script API: Document ObjectRef handling in a comment 2020-02-23 22:24:12 +01:00
SmallJoker
e8a8185d24
Settings: Fix game minetest.conf flags overriding defaults (#9404)
The game minetest.conf flags directly overwrote the global minetest.conf default values, resulting in unwanted erased mapgen flags.

* Fix set_mapgen_setting
2020-02-17 19:26:32 +01:00
Danila Shutov
6958071f49
Basic model shading (#9374) 2020-02-16 20:37:28 +01:00
Hugues Ross
7ce21788f8
Add animated_image[] formspec element (#9258) 2020-02-15 15:33:18 +00:00
SmallJoker
ee7d357602
Key settings: Clear with escape (#8282)
Key ESCAPE -> Cancel change
Key DELETE -> Remove entry
2020-02-14 20:36:58 +01:00
Wuzzy
ac5f53e364 Fix param2 set to 240 if liquid source was renewed 2020-02-13 20:38:13 +01:00
TheTermos
df74d369a3
Collision detection tweak #2 (#9365) 2020-02-13 20:13:07 +01:00
Paramat
c2f48eab4d
Display an error when a noise parameter has too many octaves (#9394)
Display an error and throw exception when one or more octaves of
a noise has spread < 1, causing random looking broken noise.
2020-02-12 23:15:07 +00:00
sfan5
91eef646a5 Script API: Check that SAOs are still usable before attempting to use them 2020-02-11 19:21:12 +01:00
SmallJoker
4eb3baa51e
StaticText: Reset background on EnrichedString change (#9340)
This also fixes the F6 profiler background color -> now controlled by EnrichedString
2020-02-01 20:41:32 +01:00
sfan5
ace3c76112 Improve core.sound_play with ephemeral sounds and player exclusion 2020-02-01 20:31:41 +01:00
Ben Deutsch
2b3490db1f Add limit parameter to decompressZlib
This can prevent untrusted data, such as sent over the network,
from consuming all memory with a specially crafted payload.
2020-02-01 14:05:26 +01:00
DS
1116918dbb
Formspec: Create a new class for inventorylists (#9287) 2020-02-01 13:55:13 +01:00
TheTermos
908e762479 Collision temporary fix for issue #6886 2020-01-27 19:30:11 +01:00
Hugues Ross
60544ac56f Add 9-slice background support to button formspec elements (#9290) 2020-01-26 19:35:26 +00:00
SmallJoker
cde2a7f6f2
Settings: Add get_flags API for mapgen flags (mg_flags, mgv6_spflags, ...) (#9284)
Unified flags handling in C++ and Lua Settings API
     -> Reading only, for now. Writing can be implemented later, if needed.
API function to read the currently active flags
     -> was impossible from Lua

Co-authored-by: Wuzzy <wuzzy2@mail.ru>
2020-01-25 16:56:54 +01:00
SmallJoker
9cb3219f34 EnrichedString: Fix substr segfault caused by non-formatted text 2020-01-24 21:06:30 +01:00
rubenwardy
987b2c5f37 Update translation sources 2020-01-24 18:34:11 +00:00
sfan5
273cdb38a9 CMakeLists: Remove some redundant declarations and flags 2020-01-23 21:29:40 +01:00
sfan5
c8583f9a5e Organize and sort out some library dependency issues 2020-01-23 21:29:40 +01:00
SmallJoker
a1da9caecf EnrichedString: Fix uninitialized variable m_default_length 2020-01-23 20:14:46 +01:00
SmallJoker
1892ff3c0d
StaticText/EnrichedString: Styling support (#9187)
* StaticText/EnrichedString: Styling support

* Fix tooltip fg/bgcolor

* Fix default color for substr(), add unittests
2020-01-22 19:09:11 +01:00
Zaoqi
fab3f5f7c8 Remove zh_* from GETTEXT_BLACKLISTED_LOCALES (#9229) 2020-01-22 19:08:07 +01:00
Wuzzy
e05b7dbb3c Remove unused weight property from objects (#9320) 2020-01-22 10:19:27 +01:00
Hugues Ross
3dfb6ecbb2 Formspec: Don't start a button click when the pointer isn't on top (#9332) 2020-01-22 10:18:09 +01:00
Wuzzy
0877587cce Resized torchlike sprite now attaches to surface (#9303) 2020-01-20 19:17:54 +00:00
ANAND
e8fd1ce623 Replace stray tab with whitespace in guiFormSpecMenu.cpp (#9317) 2020-01-18 16:50:57 +00:00
Hugues Ross
680aaa1bd5 Make clipping of formspec elements more consistent (#9262) 2020-01-16 18:41:07 +00:00
lhofhansl
cea4fd2b27 Increase star count to 1000 and decrease radius slightly (#9307)
* Increase star count to 1000 and decrease radius slightly.
* Adjust star width.
2020-01-16 17:12:34 +01:00
Maksim
c396800629 Android: fix cyrillic characters, update iconv lib (#9117) 2020-01-13 07:10:15 +01:00
Montandalar
8d75c118d9 Map download: Escape ':' to '_' (#9235)
This is necessary under Windows systems, and direct IPv6 connections.
Windows universally disallows ':' from occuring in filenames.

Other disallowed characters on Windows:

	\ / * ? " < > |

are not relevant to hostnames, IPv4 or IPv6 addresses.

Anyone who has got an existing server map saved on Linux with ':' in
the world save will want to keep that save.
2020-01-11 20:47:34 +01:00
DS
4c8af5492b Formspec: change the appeareance of the cursor on fields and co. (#8665) 2020-01-11 20:17:11 +01:00
DS
7c0e0c34ec Formspec: Fix clicking on tooltip-obstructed elements (#9266) 2020-01-04 15:45:22 +01:00
Paramat
c162340973
Remove Mapgen V7 floatlands in preparation for new implementation (#9238)
Preserve the floatland flag of existing worlds, to be used again
when the new implementation is added.
2020-01-04 01:23:57 +00:00
Montandalar
44458896d9 Use appropriate LC_ locale macro for Windows (#9230)
* Wrap LC_ macro in ifdef

Windows does not have LC_MESSAGES in locale.h, so use LC_ALL on that platform
2019-12-24 19:13:22 +01:00
Lejo
37f771a95b Fix the player information version_string return value (#8616)
* Give more player information

* Correct lua_api.txt

* Correct keys in lua_api.txt

* Improve Code

* Only Bugfix+ser_vers

* Correct doc

* Fix double
2019-12-20 19:16:29 +01:00
Hugues Ross
b50dc43f67 Don't override the FGIMG style property if the image parameter is null 2019-12-16 19:26:57 +01:00
Hugues Ross
e42faae8d9 Remove the dependency on FGIMG/BGIMG from the hovered/pressed variants
- Make guiButtonImage support null images properly
2019-12-16 19:26:57 +01:00
Hugues Ross
bd4b8d40b3 StyleSpec: 0-initialize the property_set array 2019-12-16 19:26:57 +01:00
SmallJoker
c3d0aab0bc GUIFormSpecMenu: Fix legacy sorting using std::stable_sort 2019-12-14 21:28:07 +01:00
rubenwardy
8e63d22d64 Fix spaces breaking formspec_version[] tag 2019-12-09 21:05:07 +00:00
Hugues Ross
9284313d17 Refactor to centralize GUIButton styling/rendering code (#9090) 2019-12-09 20:06:51 +00:00
SmallJoker
a462181e5f guiConfirmRegistration: Fix hidden error message 2019-12-09 20:01:16 +01:00
DS
8f73ec6c6c Formspec: make bgcolor element less confusing and allow setting fullscreen color (#8996) 2019-12-08 18:59:30 +01:00
Paul Ouellette
27ce6d0ecc Clean up craft replacements docs 2019-12-07 23:46:24 +01:00
SmallJoker
103d9c5c53 Renaming the function wasn't enough 2019-12-07 15:55:49 +01:00
SmallJoker
aa8df112ff Attachments: Fix interpolation from (0,0,0) after detach
GenericCAO::getPosition() did not take the camera offset into account
LocalPlayer attachment cleanup: Use sane getParent() function
Make that getPosition() (GenericCAO and LocalPlayer) always return the absolute position
2019-12-07 15:12:26 +01:00
rubenwardy
51f230895c Fix failing build due to code style error 2019-12-06 23:00:54 +00:00
v-rob
4f45bfd08b Add scrollbaroptions FormSpec element (#8530) 2019-12-06 20:51:10 +00:00
Pierre-Yves Rollo
cf7fda0083 Add z-index management to HUD 2019-12-06 20:31:26 +00:00
SmallJoker
f6de86ce4b Fix LocalPlayer-bound sound playback broken by 81c2370 2019-12-05 20:52:30 +01:00
sfan5
0b2f0914cc Improve client-side packet receiving 2019-11-25 20:00:24 +01:00
paramat
154080c883 Caves: Fix shadowing of 'large_cave_depth' to avoid confusion 2019-11-23 01:41:27 +00:00
paramat
ec5f591014 Dungeons: Move duplicated y limit checks to generation function 2019-11-23 01:41:27 +00:00
SmallJoker
b50a166bb0
Formspec: Fix priorities for version < 3 (#9121)
* Formspec: Fix priorities for version < 3

1) Introduce 'priority' to 'FieldSpec'
2) Sort elements based on 'priority'
3) Assign 'name' to the Item Image Button's image to show tooltips again
2019-11-20 19:39:10 +01:00
Lars Hofhansl
60bff1e6cb Waves generated with Perlin-type noise #8994 2019-11-19 19:42:52 -08:00
Paramat
b3c245bb46
Move duplicated mapgen parameters to class MapgenBasic (#9134)
'large_cave_depth', 'dungeon_ymin' and 'dungeon_ymax' are duplicated across many mapgens so should have been in class MapgenBasic from the start.
2019-11-19 19:59:17 +00:00
sfan5
c10952b574 Rework packet receiving in ServerThread
Notably it tries to receive all queued packets
between server steps, not just one.
2019-11-19 20:27:20 +01:00
Paramat
97764600e2
Randomwalk cave liquids: Remove deprecated 'lava depth' parameter (#9105)
Low-disruption first step towards removing the hardcoded cave liquid
code. Since MT 5.0.0 cave liquids can be defined and located by
biome definitions instead.
In games that do not yet use biome definitions to define and locate
cave liquids (MTGame does), lava will now appear below
y = water_level - 256 instead of below 'lava depth' (usually y = -256).
Therefore no change in most mapgens if using the default 'lava depth'.
2019-11-18 23:40:01 +00:00
sfan5
49365b25d9 Optimize semaphore wait with zero timeout on POSIX 2019-11-14 20:20:14 +01:00
sfan5
02111e4961 Fix clang-tidy and lint travis checks 2019-11-11 14:06:48 +01:00
sfan5
c44318a253 [CSM] Fix and improve minetest.get_language()
Previously this method would accidentally reset the locale
and break everything.
2019-11-11 14:06:48 +01:00
sfan5
2c4cf508a9 [CSM] Implement minetest.get_csm_restrictions()
fixes #8068
2019-11-11 14:06:48 +01:00
sfan5
3f271564e0 Run on_item_use CSM callback even if item is not marked usable
Mods may want to to handle item interaction even if the item
is not marked usable (= server-side callback exists).
2019-11-11 14:06:48 +01:00
sfan5
682b9de824 Fix camera:get_offset() in CSM 2019-11-11 14:06:48 +01:00
sfan5
b57dc70769 [CSM] Expose more env functions 2019-11-11 14:06:48 +01:00
sfan5
b0260b5ec8 Refactor CSM restriction code a bit
This also fixes find_node_near restrictions being ineffective.
2019-11-11 14:06:48 +01:00
sfan5
4d668f32a6 Call on_secondary_use when object is right-clicked 2019-11-10 13:12:31 +01:00
Paramat
3b0df9760b
Randomwalk caves: Extend beyond mapchunk vertically also (#9094)
Previously, randomwalk caves only extended beyond the mapchunk
borders horizontally, preventing vertical overlap and
interconnection.
2019-11-10 01:41:20 +00:00
sfan5
d961ece144 Be lenient with extra slashes for CSM paths 2019-11-09 16:08:38 +01:00
sfan5
485b669840 [CSM] Remove non-functional minetest.get_day_count() 2019-11-09 16:08:38 +01:00
sfan5
7e649f985c Corrections to client_lua_api.txt 2019-11-09 16:08:38 +01:00
sfan5
b1f2a69382 Introduce get_modpath() for CSM 2019-11-09 16:08:38 +01:00
sfan5
82a2e02323 Load client mods into memory before execution.
Preperation for server-sent CSM which will eventually need this.
2019-11-09 16:08:38 +01:00
sfan5
5ab546f99b Refactor loading of Lua code with mod security 2019-11-09 16:08:38 +01:00
Paramat
29a4a8e5af
Tunnels: Completely disable generation when 'cave width' >= 10.0 (#9093)
Previously, the only way to disable the 3D noise tunnels was to set
'cave width' > 1.0, however doing so did not disable the very intensive
noise calculations or the generation loop.
All the other types of cave generation (randomwalk caves, caverns)
can already be independently and completely disabled.
This feature is now needed more because the small randomwalk caves are
now available for use as an alternative to the 3D noise tunnels.
2019-11-09 02:09:52 +00:00
Paul Ouellette
d11bfa3ef5 Make core.get_favorites("local") ignore duplicates (#7926) 2019-11-08 22:18:20 +01:00
Paramat
2a74727857
Randomwalk caves: Add parameters for number, proportion flooded. Allow small caves (#8928)
Add mapgen parameters to set the range of the random number of
randomwalk caves per mapchunk, and to set the proportion that are
flooded with liquids.
Default values are, for now, unchanged from the previous hardcoded
values.

Add parameters to allow small randomwalk caves
Disabled by default for now as they have never been present in the
non-mgv6 mapgens.
2019-11-08 03:09:43 +00:00
DS
5506e97ed8 Formspec: draw order and clipping for all elements (#8740) 2019-11-07 20:11:01 +01:00
SmallJoker
2907c0f3a2 Android: Fix broken double-tap after 49 days uptime 2019-11-03 12:59:12 +01:00
SmallJoker
388ea737f5 Clean up font caching, fix bitmap fonts 2019-11-03 11:45:33 +01:00
Pierre-Yves Rollo
72416a6a1f Formspec: add hypertext element 2019-11-03 11:45:33 +01:00
random-geek
f2e62298a5 Change some usages of "deprecated" to "obsolete" (#9062)
"Deprecated" means that something is still in use, but is unsupported and needs to be removed.
"Obsolete" means it is already out of use.
2019-10-29 19:23:12 +01:00
random-geek
53ebd803c6 Change some rough/inappropriate language in comments (#9061) 2019-10-24 01:17:00 +01:00
Paramat
1f142ec06f
Improve light curve parameter limits and documentation (#9054)
Revert gamma upper limit to 3.0 because that was raised based on
a misunderstanding and had no benefit. A sane upper limit is
needed as players on a competitive server tend to use the maximum.
Set gamma lower limit to 0.33 for consistency with 3.0.
Set sane limits on alpha, beta, boost and enforce these in code
to limit values entered in minetest.conf and to avoid easy cheating
by editing settingtypes.txt.
Improve documentation and 'readable' setting names.
Clarify that gamma does not significantly affect natural night light.
light.cpp: Various codestyle and comment improvements.
2019-10-24 01:08:49 +01:00
random-geek
2f3c96b38d Remove legacy flat-file map code 2019-10-23 20:53:24 +02:00
Dmitry Marakasov
2ecf57c640 Fix build issue due to conflicting s64 type definitions (#9064)
See comment in irrlichttypes.h and https://sourceforge.net/p/irrlicht/bugs/433/
2019-10-23 20:28:55 +02:00
Paul Ouellette
904b05b0d3 Allow calling ItemStack with no arguments (#8783) 2019-10-23 19:48:19 +02:00
SmallJoker
a978278bfb Formspecs: Reset version number on rebuild 2019-10-20 12:44:52 +02:00
Paramat
79440605ec
Make natural night light as bright as MT 0.4.16 (#9053) 2019-10-18 21:54:44 +01:00
Warr1024
15b6922ae6 Correction for alpha blending issues in texture mod compositing (#9029) 2019-10-18 19:17:35 +02:00
Paramat
47d0779365
Randomwalk caves: Reduce 'insure' value from 10 to 2 (#9035)
This value reduces how far randomwalk caves can extend into the
mapchunk padding, to avoid 'out of voxelmanip' cave nodes which cause
flattened cave walls.
Testing shows that a value of 2 (instead of 10) is enough to make
'out of area' nodes extremely rare.
Reducing this value results in a higher chance of overlap and
connection with caves of neighbour mapchunks.
2019-10-13 00:18:23 +01:00
Hugues Ross
69a2099c04 Add more visual feedback for button states (#8916)
- Add style properties for overriding the the hovered/pressed state
  - By default, hovered buttons are a lighter version of the base color
  - By default, pressed buttons are a darker version of the base color
- Add hovered bg image support for image buttons (style property)
2019-10-12 18:44:23 +02:00
updatepo.sh
22e04d9919 Update translation strings 2019-10-12 14:29:24 +02:00
Paramat
f483a1a9b2
Fix isDead()/autoforward crash (#9031)
Crash occurred in singleplayer when leaving a world with
autoforward enabled then re-entering a world.
2019-10-09 19:39:50 +01:00
SmallJoker
cbcb9e0b1c ContentCAO: Fix segfault on quit (attached) 2019-10-09 20:03:31 +02:00
ANAND
b49dfa92ce Revert Client::sendPlayerPos optimization (part of 81c7f0a) (#9025)
Comment out the if statement that prevents sending TOSERVER_PLAYERPOS if the player is dead.
2019-10-08 20:36:56 +02:00
sfan5
825579b43d Fix upright_sprite lighting when colors are set
fixes #9020
2019-10-06 17:19:42 +02:00
SmallJoker
dee22104b7
Revert "Fix the bgcolor formspec element (#8716)" (#9018)
This reverts commit 1db3d252cff9e8d61fecf1052d7497813851da51.
Temporary solution until a compatible solution is found to define both - formspec and fullscreen backgrounds.
2019-10-06 14:50:45 +02:00
sfan5
dde0628976 Fix warnings in guiButton.h 2019-10-05 18:15:26 +02:00
Jacob Lifshay
76032159bd Fix unwanted detaching when damage = 0 2019-10-05 15:45:05 +02:00
SmallJoker
81c2370c8b
Attachments: Fix attachments to temporary removed objects (#8989)
Does not clear the parent's attachment information when the child is deleted locally.
Either it was removed permanently, or just temporary - we don't know, but it's up to the server to send a *detach from child" packet for the parent.
2019-10-02 19:11:27 +02:00
SmallJoker
61e9c1b0dd
Textures: Load base pack only as last fallback (#8974) 2019-09-29 19:57:29 +02:00
SmallJoker
c2458d3d3a label[]: Fix broken colors since 2c9edef 2019-09-29 14:52:41 +02:00
ANAND
3799ffd9d5 Move Quicktune code to util/ (#8871) 2019-09-29 13:41:13 +02:00
rubenwardy
07bdd6049b Fix error message caused by adding new parameter to background (#8922)
Adds background9[] element to keep backwards compatibility in formspec prepends.
2019-09-29 13:40:59 +02:00
lhofhansl
5fde69798c
Simple shader fixes. (#8991)
1. Pass current camera offset to shader, so shader have access to the global coordinates
2. Pass animation timer to fragment shader. C++ code is already there, just wasn't declared in the shader
3. Delay animation timer wrap-around (from 100s to about 16 minutes)
2019-09-26 13:57:39 -07:00
SmallJoker
26b39f1eae
Fix some reference counters (memleak) (#8981)
Fix some reference counters (memleak)
Map::dispatchEvent: Allocation safety using references
2019-09-24 19:05:28 +02:00
sfan5
d77ea76476
Fix broken build
The variable name changed but this didn't cause merge conflicts, so it wasn't caught before.
2019-09-23 00:28:26 +02:00
DS-Minetest
cf78e37da3 Move the code for meta formspec into bool Game::nodePlacement(const ItemDefinition &selected_def, 2019-09-22 22:12:49 +02:00
sfan5
70f9e1aafa
Punchwear (improved) (#8959) 2019-09-22 22:12:21 +02:00
SmallJoker
fec30e37ac
Fix AreaStore's IDs persistence (#8888)
Improve documentation
Read old formats
Fix free ID function. Return first gap in map
2019-09-21 17:54:52 +02:00
SmallJoker
5fa614d97e
Wieldhand: Specify which ItemStack to use (#8961)
Makes 'get_wield_item' to return the "main" ItemStack
2019-09-21 11:44:24 +02:00
Anand S
47da640d77 Add support for per-player FOV overrides and multipliers 2019-09-19 20:14:16 +02:00
sfan5
5c9983400f Remove incorrect MutexAutoLock
The line declared a variable "m_con" instead of locking m_con.
getClient() doesn't need this anyway, so remove it.
2019-09-19 16:46:41 +02:00
DS-Minetest
0b5c5499ec Trigger on_place in many situations even if prediction failed 2019-09-19 16:36:02 +02:00
SmallJoker
4271889ef8 Settings: Prevent mutex deadlock in remove() (#7803) 2019-09-18 18:48:41 +02:00
SmallJoker
94a5df795c
Inventory: Properly revert client predictions (#8945)
Caused by incremental inventory sending
Previously everything was overwritten by serializing the entire inventory
2019-09-18 18:47:09 +02:00
Hugo Locurcio
05a7da6279 Improve undersampling settings
The setting now accepts values between 1 and 8 in the
Advanced Settings menu.
Values 0 and 1 now behave the same way (setting it to 1 won't
disable MSAA anymore), so there's no need to expose 0 as a value.

This closes #8939.
2019-09-17 19:06:51 +02:00
SmallJoker
e0a85fae01 Inventory: Undo prediction on drop 2019-09-17 19:02:01 +02:00
DS
1db3d252cf Fix the bgcolor formspec element (#8716) 2019-09-15 17:14:31 +01:00
rubenwardy
1ea9bfc6f7 Fix formspec version backup in prepends losing data 2019-09-15 16:56:11 +01:00
Paramat
23bd5630d0
Dungeons: Clean up parameters, improve structure variety (#8918)
While preserving the general character of dungeon structure.
Slightly increase the range of standard room horizontal size, while
preserving the average horizontal size.
Return to classic maximum large room size of 16x16x16.
Make 1 in 4 dungeons have a 1 in 8 chance for each room being 'large',
making multiple large rooms possible for the first time.
Make 1 in 8 dungeons allow diagonal corridors, to make these a little
more common.
Make corridor width vary from 1 to 2, but forced to 2 if diagonal
corridors are allowed, to make them passable.
Add some comments.
2019-09-14 23:02:07 +01:00
SmallJoker
1de4ca1f9d Built-in formspecs: Force version 1 2019-09-14 20:42:54 +02:00
ANAND
8e42a25e57 client.h: Add missing const's 2019-09-14 20:16:55 +02:00
ANAND
16d6ca3937 LocalPlayer: Fix code-style 2019-09-14 20:16:55 +02:00
ANAND
eea082ee3f client.cpp: Fix code-style in Client::sendPlayerPos 2019-09-14 20:16:55 +02:00
ANAND
e2d6445f2a Fix LocalPlayer::isDead always returning false if player is immortal 2019-09-14 20:16:55 +02:00
ANAND
81c7f0ae04 Send ActiveObjects once right after Init2 2019-09-14 20:16:55 +02:00
SmallJoker
9acd36bf99 Formspecs: Introduce formspec_version to mods 2019-09-14 19:43:08 +02:00
SmallJoker
b0baa698a4 CSM: Fix itemstack:get_meta() 'metadata' indexing error 2019-09-14 19:42:30 +02:00
SmallJoker
23677be951 Load CSM environment after the restrictions are known
Safety-guards for CSM callbacks to abort on a bad implementation
Only run callbacks when the mods are loaded (and with it: builtin)

Duplication checks inside constructors
2019-09-14 19:42:25 +02:00
SmallJoker
720aedb467 InventoryManager: Fix virtual function overload warning 2019-09-09 20:35:45 +02:00
SmallJoker
fae6242d4e Send cumulated inventory changes only each step (#8856)
Applies to player and detached inventories
2019-09-09 19:19:54 +02:00
updatepo.sh
ae92bbe508 Update translation strings 2019-09-09 19:18:30 +02:00
Paramat
4682c7be5d
Dungeons: Remove non-functional 'projecting dungeons' setting (#8897) 2019-09-08 17:51:34 +01:00
HybridDog
36bfc67574 Move debug.txt after it grows too big (#8904)
Before opening the file for writing, its file size is tested. If it exceeds 50 MB, it is moved to debut.txt.1, otherwise the log is appended to the old messages. An old debut.txt.1 is removed if it already exists.
2019-09-07 19:38:54 +02:00
SmallJoker
2c9edefde3 label[]: Fix cut-off translated text 2019-09-07 11:15:12 +02:00
sfan5
ea9b241c13 Fix Irrlicht 1.9 support 2019-09-06 18:29:29 +02:00
sfan5
4582691104 Fix Inventory::moveItemSomewhere() 2019-09-03 20:16:36 +02:00
SmallJoker
f3acdd3914
Inventory: Handle removeItem leftovers (#8884) 2019-09-02 19:30:36 +02:00
Muhammad Rifqi Priyo Susanto
cd1d01b8b4 'All Settings': Don't use checkboxes for 'no...' mapgen flags (#7847) 2019-09-01 22:43:41 +01:00
ANAND
095f26a4f8 particles.cpp: Fix code-style
Mainly spacing and pointer placement
2019-08-31 19:05:53 +02:00
ANAND
96762af3ce clientobject.h: Fix code-style 2019-08-31 19:05:53 +02:00
Pedro Gimeno
9543b84970 Fix rotation of attached particlespawner
Co-authored-by: ANAND <ClobberXD@gmail.com>
2019-08-31 19:05:53 +02:00
SmallJoker
1d3f5af7c0 Inventory: Fix missing setModified calls
Previously inv:remove_item and inv:set_list did not trigger an inventory update
2019-08-25 09:46:54 +02:00
Paramat
b53a60c8d5
Mapgen v6: Various mudflow code improvements and bugfixes (#8805)
Calculate 'i' inside 'y' loop to avoid 'i' and 'y' becoming
out of step due to the uses of 'continue'.
Simplify calculation of 'p2d' when coordinates are inverted.
Remove some unnecessary and unreliable 'index out of
voxelmanip' checks.
Move calculation of '&em' out of loops.
For 'Loop further down until not air' code, use y coordinate
to detect being out of voxelmanip, instead of checking index
which did not detect that.
Add and improve comments.
Indent the 'for (;; y--) {' loop.
Improve format and fix codestyle issues.
2019-08-24 20:06:31 +01:00
SmallJoker
fbc8724d59 fontengine: Fix non-gettext builds 2019-08-24 19:11:50 +02:00
SmallJoker
0b4f424f41
Inventory: Send dirty lists where appropriate (#8742)
This change reduces the amount of sent data towards clients. Inventory lists that are already known to the player are skipped, saving quite some data over time.

Raises protocol version to 38 to ensure correct backwards-compatible code.
2019-08-24 19:07:38 +02:00
Paul Ouellette
008b80fe1c Add ItemStack:get_description() to get tooltip (#8847) 2019-08-24 18:38:02 +02:00
sfan5
efbac7e446 Improve occlusion culling in corridors with additional check 2019-08-24 18:37:25 +02:00
sfan5
e8716ffede Restore approximate occlusion check
While less precise, it worked better which is what matters in the end.
2019-08-24 01:41:55 +02:00
DS
b14aa305ce Make Mapgen::spreadLight use a queue (#8838) 2019-08-23 22:16:50 +02:00
SmallJoker
6ada090bb0 Occlusion: Check for light_propagates and do mapblock bounds checks 2019-08-23 19:17:43 +02:00
SmallJoker
7d016b4efd Occlusion: Begin cleanup 2019-08-23 19:17:43 +02:00
sfan5
ba8fb774c1 Revert "Don't send position update packet if player is dead"
This reverts commit fb6f1fdcbe3ee2321cc33eb00f2c6da86744d00a.
2019-08-21 15:30:52 +02:00
SmallJoker
b8131c3415 remove_detached_inventory: Fix segfault during mod load 2019-08-20 19:42:21 +02:00
ANAND
fb6f1fdcbe Don't send position update packet if player is dead 2019-08-20 18:49:06 +02:00
ANAND
3c395d908f Disable autoforward if player is dead 2019-08-20 18:48:28 +02:00
theviper121
ded5da7800 Restore intended functionality to minimap markers (#8819) 2019-08-19 19:18:11 +02:00
SmallJoker
d73e458db6
ClientInterface: Use recursive mutex to prevent freeze in on_newplayer() (#8808) 2019-08-17 13:27:28 +02:00
sfan5
13b22e2afb Remove unused function in ReliablePacketBuffer 2019-08-16 20:03:53 +02:00
sfan5
428a4c86e3 Minor refactor of IncomingSplitBuffer 2019-08-16 20:03:53 +02:00
sfan5
fc2f55d931 Drop m_list_size from ReliablePacketBuffer
It's not required and, worse, can lead to bugs.
2019-08-16 20:03:53 +02:00
Paramat
d7c10b66d3
Mapgen v6: Fix mudflow iteration and iterate twice (#8795)
In MapgenV6::flowMud(), the previous implementation of coordinate
inversion caused the 2 inverted mudflow iterations (out of the 3
iterations) to not loop over the area, so only 1 non-inverted
iteration occurred.

Fix this bug but only iterate mudflow twice, as mapgen v6 has only
had 1 iteration for many years. There is now a good balance of 1
non-inverted iteration and 1 inverted iteration.
2019-08-15 20:32:28 +01:00
sfan5
2db0e93f73 network: Stricter handling of split packets 2019-08-15 20:15:22 +02:00
sfan5
c4491165da network: Fix crash in ReliablePacketBuffer on mismatching packets
In the error condition the exception would be thrown before m_list_size
is decremented, causing a nullptr dereference in e.g. popFirst().
2019-08-15 19:18:54 +02:00
upsilon
b2065756cf Add function minetest.read_schematic 2019-08-14 13:15:41 +02:00
Jozef Behran
bf22184d6e Fix unnecessary exception use in 3 more methods (#8791)
* Fix unnecessary exception use in Server::SendBlocks

The code in this method calls getBlockNoCreate and then
messes around with try...catch to skip blocks which are not
in the memory. Additionally, it repeatedly calls
m_env.getMap() inside this loop. Speed the code up by
extracting the m_env.getMap() out of the loop and getting
rid of the try...catch.

* Fix unnecessary exception use in Server::SendBlock

Another unnecessary try...catch is slowing down
Server::SendBlock. Remove that to speed it up and get a nice
side effect of simplifying the code in question.

* Fix unnecessary exception use in MMVManip::initialEmerge

Remove another unneeded exception usage from
MMVManip::initialEmerge to speed that code up and simplify
it but be careful to not remove the braces as there is a
TimeTaker in use there.
2019-08-13 20:02:50 +02:00
Jozef Behran
72b7a957af Fix unnecessary exception use in Map::getSectorXXX (#8792)
The Map::getSectorNoGenerate throws an exception but no other
code is really dependent on that. Fix the odd instance of
misuse in ClientMap::emergeSector and remove the exception
throwing version of the method along with the "NoEx" suffixes
in the names of these methods.
2019-08-13 19:58:27 +02:00
SmallJoker
539f016c1b
Better F6 profiler (#8750)
Update the profiler names to make more sense of what they actually represent
Move the profiler code from header to its source file
Use monospace font to align lines
Format the statistics line to align better with surrounding values
Refresh the profiler each 3 seconds (roughly)
2019-08-13 19:56:55 +02:00
Jozef Behran
e9ceead81d Fix unnecessary exception use in Map::isNodeUnderground
The isNodeUnderground calls getBlockNoCreate which calls
getBlockNoCreateNoEx and throws InvalidPositionException
if the returned value is nullptr, which isNodeUnderground
then catches to return "false". Remove the try..catch in
isNodeUnderground by calling getBlockNoCreateNoEx instead
of getBlockNoCreate and checking the returned value for
nullptr.
2019-08-13 19:40:59 +02:00
Jozef Behran
833e60d8d2 Fix compare between pointer and 0 in unittests
Pointers shall be set to nullptr, not 0, according to the
coding standards. By implication they shall be compared with
nullptr, not 0, too. Fix this code to match that.
2019-08-13 14:44:32 +02:00
Beha
2f879e8bbd Clear old item groups when they are overridden. (#8753)
This fixes overridden items keeping their old groups in the group to
items mapping even after their groups have been changed in lua.
It also prevents a more widespread issue where overriding an item
will add its content ID *twice* to the mapping, resulting in odd
behaviour in features such as ABMs.
2019-08-12 19:18:52 +02:00
rubenwardy
91114b562f Add support for set_formspec_prepend in main menu (#8611) 2019-08-12 19:16:35 +02:00
Rogier
a067d40454 Handle multiple deserialization of a block's entities
This fix consists of two parts:
- Clear the list of stored entities. This has no side-effects.
- Catch the case where active entities exist and print a message.
  Clearing the active entitiy list has side-effects that should
  be handled. (those entities are known to the environment and
  to clients).

  As avoiding those side-effects is more complex, and as this
  problem is not expected to occur (with PR #4847 merged), there
  is no real incentive to implement this ATM.

This issue was a contributing factor to bug #4217. With the other
contributing factor removed (PR #4847), this commit makes sure this
factor does not go unnoticed if it ever happens again.
2019-08-12 19:14:07 +02:00
Jozef Behran
49f1006183 Fix breakage of non-GLES2 setups (#8774)
The commit 526a9e4b66abaf83eb6b1aaa3e93375acd87b830 breaks
the non-GLES2 setups because the code that is intended to
handle that is behind "elseif()" which is interpreted as
"elseif(false)" and thus the code never gets executed. Fix
that by changing the offending line to else().

Additionally, to avoid breaking the server only build
(which shall not have a dependency on GL/GLU/GLES at all),
enclose the entire block code in if(BUILD_CLIENT).
2019-08-10 23:32:46 +02:00
Paul Ouellette
120155f312 Fix some issues with minetest.clear_craft (#8712)
* Fix some issues with minetest.clear_craft

- Fix memory leak
- Fix crafts with an output count not being cleared when clearing by
  input.
- Fix recipe list being reversed when clearing by input.

* Add CraftInput::empty()
2019-08-10 23:28:00 +02:00
Jozef Behran
86d7f84b89 Merge pull request #8776 from osjc/FixGetNode
Finish getNode cleanup
2019-08-10 19:45:44 +02:00
sfan5
cf64054390 Implement adding velocity to player from Lua
The intended usecase is knockback, but there's potential for more.
2019-08-10 19:44:27 +02:00
ANAND
d1c27c7e80 Allow customizing chat message format (#8529) 2019-08-08 17:04:46 +01:00
ANAND
cc610c74a7 guiVolumeChange: Fix child not being removed 2019-08-08 18:03:35 +02:00
Paramat
37923920a0
Avoid crash caused by, and improve, 'findSpawnPos()' (#8728)
Avoid an unsuitable spawn position (which if outside mapgen limits can
cause a crash) if the main 0-3999 loop reaches its end. Fallback to a
spawn at 0,0,0.
Check the mapgen-returned 'spawn_level' value for being outside limits.
When 'air_count' reaches 2, move back down 1 to spawn in the lower
empty node.
If the spawn position is disallowed by 'objectpos_over_limit()', 'break'
from loop instead of 'continue' because positions above are probably
also over limit.
Reset 'air_count' to 0 if an obstruction is found, to make 'air_count'
consecutive empty nodes.
Allow spawn in 'airlike' drawtype nodes such as mod-added vacuum,
alien atmospheres, fog etc.
Add clarifying comments and improve codestyle.
2019-08-07 22:07:51 +01:00
SmallJoker
0c533dc436 Game: Fix double BS multiplication 2019-08-07 21:23:01 +02:00
ANAND
e788ee283f Client::Interact: Use InteractAction enum instead of numeric constants
This replaces the magic numbers used as interaction modes both client-side and server-side, primarily for the sake of ease-of-readability.
2019-08-07 19:21:14 +02:00
SmallJoker
e462a9a5ef
Unify wield item handling (#8677)
This moves the wield item functions to Player and the tool utils for range calculation
Also 'local_inventory' was removed due to redundancy in Client
2019-08-07 19:16:31 +02:00
ANAND
003af74213 guiConfirmRegistration: Set focus to text field (#8761) 2019-08-07 19:15:46 +02:00
ANAND
fa6bc699bc Hide chat when console is open (#8656) 2019-08-07 19:15:33 +02:00
DS
1cef09ff10 Fix inventory_overlay for nodes without inventory_image (#8433) 2019-08-07 12:07:30 +02:00
sfan5
19426387d4 Optimize usage of TOSERVER_GOTBLOCKS packet 2019-08-07 11:32:16 +02:00
Beha
4d7f296717 Do not add group values of zero to group lists. (#8751)
This fixes an issue where when the engine looked up groups (for example,
in ABM node names), NodeDefManager's m_group_to_items would contain nodes
with a group value of zero, resulting in nodes with flammable = 0 being
burned by a fire mod with a group:flammable checking ABM.

It brings consistency to the behaviour described in the api
documentation, where zero and nil groups should be the same.
2019-08-07 10:48:04 +02:00
SmallJoker
233cb86e86
Clean up and fix freetype=false crashes (#8641)
A IGUIFont of type bitmap/vector cannot be converted to CGUITTFont
Fixes various segfaults in gameplay
Shorter font cache code, cleaned up (?)
2019-08-06 21:33:13 +02:00
Paramat
8da35c22d1
Mapgen Flat: Fix and improve getSpawnLevelAtPoint() (#8756)
Previously, this wrongly returned ground level (a position containing
a solid node) as spawn level.
Return ground level + 2 (+ 2 to spawn above biome 'dust' nodes).
Improve codestyle and make more consistent with generateTerrain().
2019-08-06 02:30:28 +01:00
sfan5
800fa2d8e7 Fix binary-string confusion in client network code 2019-08-04 20:40:35 +02:00
sfan5
6c2ded4cac Unify GLES support in gui scaling filter 2019-08-04 16:12:52 +02:00
sfan5
ca363d3ef8 Unify OpenGL ES support 2019-08-04 16:12:52 +02:00
sfan5
526a9e4b66 Let ENABLE_GLES appear in cmake_config.h and change its functionality 2019-08-04 16:12:52 +02:00
rubenwardy
4f7fa8d417 Add formspec testing to test mod in minimal 2019-08-03 19:36:30 +01:00
rubenwardy
9541165752 Add styles to most elements 2019-08-03 19:36:30 +01:00
rubenwardy
ec3795a55c Add style[] tag with button support 2019-08-03 19:36:30 +01:00
rubenwardy
d1a1c5cbf0 Add custom colorable GUIButton implementation 2019-08-03 19:36:30 +01:00
rubenwardy
41ad0f4f20 Fix negative offsets not being supported by container[] 2019-08-03 16:20:15 +01:00
Beha
1a97d06b5a Correct ServerActiveObject's virtual getArmorGroups() to be const.
Due to commit ec3142a , UnitSAO's getArmorGroups() did not match
ServerActiveObject's, notably resulting in the lua get_armor_groups() call
returning nothing.
2019-08-01 18:14:37 +02:00
SmallJoker
3ceef8e6a0 Mainmenu: Use textarea in error formspecs 2019-08-01 15:56:28 +02:00
Wuzzy
ec3142af99 Group "immortal" also protects players from damage
Document new meaning of immortal=1 for players

Disable breathing if player is immortal

Hide builtin statbars if player immortal (delayed)

Co-authored-by: ClobberXD <ClobberXD@gmail.com>
2019-08-01 14:45:23 +02:00
sfan5
3296952ae5 Allow toolcaps to override the built-in times for dig_immediate 2019-07-31 18:28:21 +02:00
Methacrylon
cdc7eb2d4c Sky: Refactor of moon and sun drawing (#8683)
Split sun and moon render parts from the main render function.
2019-07-30 20:25:47 +02:00
Beha
b8aaef704d Move the clamping of hp/breath when their maximums change to read_object_properties(). (#8689)
This prevents set_properties() calls that have nothing to do with hp_max or breath_max overriding the saved hp before another mod has the chance to set a player's intended hp_max (such as in on_joinplayer).
2019-07-30 17:29:45 +02:00
DS-Minetest
115ef6c09c Rename guiScrollBar to GUIScrollBar 2019-07-29 21:45:39 +02:00
SmallJoker
4aa9a669cb
ContentCAO: Fix broken attachments on join (#8701)
What happened:
1) Object data is received. Client begins to read the data
2) Client initializes all its children (gob_cmd_update_infant)
3) Children try to attach to parent (yet not added)
4) Parent initializes, is added to the environment

And somewhere in between, Irrlicht wrecks up the attachments due to the missing matrix node.

The solution here is to:
1) Use the same structure as ServerActiveObject
2) Attach all children after the parent is really initialized
2019-07-29 19:14:07 +02:00
DS-Minetest
705630e7d0 guiScrollBar: move directly to clicked pos if clicked into tray 2019-07-28 21:43:07 +02:00
SmallJoker
8efa1de835 Check for 'action' field in ABMs & LBMs 2019-07-27 21:13:47 +02:00
Paul Ouellette
fe6c666da2 Prefix RecipePriority elements with PRIORITY_ 2019-07-27 14:42:41 +02:00
Paul Ouellette
395b1b3346 Initialize priority in CraftDefinition constructors
The priority is used by getCraftResult, which may be used before
initHash is called.
2019-07-27 14:42:41 +02:00
Pierre-Yves Rollo
c3daf2a8be Fix missing item images clipping in formspecs (#8652)
* Fix clipping of itemimage

* Code style

* More code styling
2019-07-26 19:44:29 +02:00
Paramat
ce87ef397f
Initialise 'seabed_height' to avoid compilation warning (#8715) 2019-07-26 17:51:53 +01:00
Paramat
0cde6fc552
Re-order mapgens in mainmenu and 'all settings' mapgen selection (#8705)
v6 always last to discourage selection.
Special mapgens flat, fractal, singlenode, next to last. Of these, singlenode
last to discourage selection.
Of the remaining, v5 last due to age, v7 first due to being the default.
2019-07-25 20:46:28 +01:00
Paramat
245a31d6b7
Mgfractal: Make non-fractal terrain optional (#8702)
Enabled by default.
Only allow spawn on fractal, not on seabed terrain.
Various codestyle and comment improvements.
2019-07-25 19:58:35 +01:00
y
ecd20de64d Removed debug.upvaluejoin to prevent leak of insecure environment 2019-07-24 11:43:09 +02:00
Paramat
76824bac9f
Document the deprecation of hardcoded cave liquids (#8692) 2019-07-20 01:03:52 +01:00
Lars Hofhansl
9fe3246154 Optimize getting active objects a bit. #8674 2019-07-16 15:55:17 -07:00
Paramat
458f617575
Dungeons: Make multiple large rooms possible (#8678)
Re-add the random size range for large rooms.
Remove 'first_room_large' bool.
Add 'large_room_chance' parameter that can disable large rooms,
specify 1 large room, or specify a chance for large rooms.
If 1 or a chance is specified, the first generated room is large,
to take advantage of the intersection checks that are done for the
1st room only.
2019-07-16 20:39:58 +01:00
Paramat
0c31946943
Move more dungeon parameter selection to mapgens (#8653)
Move 'num_dungeons' to 'DungeonParams'.
Add new parameter 'num_rooms' to replace 'rooms_min' and 'rooms_max',
so that the mapgen has complete control over the number of rooms.
Add new bool 'first_room_large' so that the mapgen chooses this
instead of a hardcoded 1 in 4 chance.
Add new parameter 'room_size_large' to replace 'room_size_large_min'
and 'room_size_large_max', so that the mapgen has complete control
over this.
2019-07-09 20:38:51 +01:00
DS-Minetest
140aeabd87 Do predict when sneak-place to node with on_rightclick 2019-07-08 14:21:27 +02:00
Lars Hofhansl
0971a14a57 Improve ABM time budget handling. #8645 2019-07-07 23:23:00 -07:00
Paramat
bb14b7e956
Dungeongen: Remove most hardcoded dungeon nodes (#8594)
Biome-defined dungeon nodes was added as a feature to MT 5.0.0.
So now remove most of the hardcoded dungeon node code that assumes a
game has stone, sandstone, desert stone, and no other stone types.
If biome-defined dungeon nodes are not found, dungeon nodes fall back
to the 'cobble' mapgen alias if present, if not present they fall back
to biome-defined 'stone'.
Remove now-unnecessary mapgen aliases from MapgenBasic. Non-mgv6 games
now only need to define 3 to 5 mapgen aliases.

Document dungeon parameters.

Make c_lava_source fallback to c_water_source as both are used as cave
liquids.
2019-06-30 22:55:20 +01:00
Vitaliy
93f7e10e0d Optimize and unify mesh processing (#7851) 2019-06-28 03:22:16 +01:00
v-rob
5e7004e7af Add compatible, consistent coordinate system to FormSpecs. (#8524) 2019-06-27 13:40:49 +01:00
ANAND
91d244c522 Increase upper limit of display_gamma to 10 (#8618) 2019-06-27 04:04:12 +01:00
rubenwardy
429a989648 Add support for 9-sliced backgrounds (#8600)
9-slice textures are commonly used in GUIs to allow scaling them to match any resolution without distortion.

https://en.wikipedia.org/wiki/9-slice_scaling
2019-06-22 16:03:54 +02:00
SmallJoker
4e3c1916f7 Fix segfault on quitting with open node formspec (#8608) 2019-06-21 21:00:30 +02:00
Markus Mattes
e3738c2f61 Fix handling of --color and --worldlist command line arguments
They verify the provided value and error if a wrong value got provided
command line description for color was differnt on win32 but  code did not handle any differenc
extended the command line description for world and worldname that it is clear that they only start a local game if used with --go

Fixes #7875
2019-06-21 01:29:35 +01:00
Paramat
5d4850a7ce
Mapgen Carpathian: Add optional rivers (#7977)
Rivers are disabled by default and will not be added to existing worlds.
Rewrite getSpawnLevelAtPoint() to be simpler and more consistent with
generateTerrain().
2019-06-19 01:06:08 +01:00
stujones11
95a37efc31 Android: Use system provided path for default TMPFolder setting (#8505) 2019-06-15 15:12:59 +02:00
SmallJoker
f1f9361bc8 Settings: Disallow space characters entirely
Lua API:
> Setting names can't contain whitespace or any of ="{}#
2019-06-10 18:30:59 +02:00
SmallJoker
e2f8f4da83
Formspecs: Close on metadata removal (#8348)
Formspecs will now close as soon the formspec string in the node metadata turns invalid.
2019-06-10 13:01:07 +02:00
SmallJoker
e40be619f2
Add disable_jump to liquids and ladders (#7688)
Remove second nodedef check by improving the colliding node detection
Also remove the 2nd check in old_move, correct standing node a bit
2019-06-10 13:00:35 +02:00
adrido
bd6f1cca9d Add compatibility to vcpkg buildsystem (#8317) 2019-06-10 02:56:55 +01:00
SmallJoker
a687efa6df
Damage: Play no damage sound when immortal (#8350)
Add isImmortal server-side for proper enable_damage handling
Rework log messages
2019-06-09 11:25:41 +02:00
SmallJoker
cb00632e23
HTTP API: Allow binary downloads and headers (#8573)
Add minetest.features.httpfetch_binary_data
2019-06-06 19:13:29 +02:00
Paramat
7379aa74cf
Dungeons: Settable density noise, move number calculation to mapgens (#8473)
Add user-settable noise parameters for dungeon density to each mapgen,
except V6 which hardcodes this noise parameter.

Move the calculation of number of dungeons generated in a mapchunk out
of dungeongen.cpp and into mapgen code, to allow mapgens to generate
any desired number of dungeons in a mapchunk, instead of being forced
to have number of dungeons determined by a density noise.

This is more flexible and allows mapgens to use dungeon generation to
create custom structures, such as occasional mega-dungeons.
2019-06-01 20:50:43 +01:00
SmallJoker
a1459a9eac Fix persistent ^[brighten after damage again (#5739)
The old texture modifier is restored by passing `m_previous_texture_modifier`.
Either copy it manually or let the function parameter do that.

Victims so far:
8e0b80a Apr 2018
eb2bda7 May 2019
2019-05-26 09:54:26 +02:00
David G
40dadecb6e override.txt: Fix crash due to CRLF endings (#8439) 2019-05-25 18:01:55 +02:00
SmallJoker
627a96cd99 Do not drag-place stack into 'craftpreview' slot (#8514) 2019-05-25 17:41:35 +02:00
stujones11
b917ea4723 Add IGUIScrollbar implementation with variable bar sizes (#8507) 2019-05-24 16:42:05 +01:00
SmallJoker
a2848c9cde Fix forgotten PlayerSAO cast in a90f2ef 2019-05-21 21:37:47 +02:00
DS
9d09c87f13 Make autoforward simulate the 'up' key (#8249) 2019-05-21 19:50:00 +01:00
ANAND ツ
a90f2efb12 Check for out-of-bounds breath when setting breath_max (#8493) 2019-05-21 19:37:58 +02:00
SmallJoker
cfef466d4e l_mapgen.cpp: Fix LINT broken since b1b40fe 2019-05-21 19:16:01 +02:00
HybridDog
12e3d3d12f Prioritise craft recipes
When multiple recipes are applicable, the recipes are prioritised in this order:
toolrepair < shapeless with groups < shapeless < shaped with groups < shaped
For cooking and fuel, items are prioritised over item groups
2019-05-20 20:59:51 +02:00
HybridDog
1604b949fd Test crafting hash type only once for a recipe 2019-05-20 20:59:36 +02:00
Paramat
b1b40fef16
Allow multiple cave liquids in a biome definition (#8481)
This allows games to specify biome cave liquids and avoid the old
hardcoded behaviour, but preserves the ability to have multiple
cave liquids in one biome, such as lava and water.

When multiple cave liquids are defined by the biome definition,
make each entire cave use a randomly chosen liquid, instead of
every small cave segment using a randomly chosen liquid.

Plus an optimisation:
Don't place nodes if cave liquid is defined as 'air'
2019-05-18 21:13:14 +01:00
Jozef Behran
eb2bda7d0b Optimize string (mis)handling (#8128)
* Optimize statbar drawing

The texture name of the statbar is a string passed by value.
That slows down the client and creates litter in the heap
as the content of the string is allocated there. Convert the
offending parameter to a const reference to avoid the
performance hit.

* Optimize texture cache

There is an unnecessary temporary created when the texture
path is being generated. This slows down the cache each time
a new texture is encountered and it needs to be loaded into
the cache. Additionally, the heap litter created by this
unnecessary temporary is particularly troublesome here as
the following code then piles another string (the resulting
full path of the texture) on top of it, followed by the
texture itself, which both are quite long term objects as
they are subsequently inserted into the cache where they can
remain for quite a while (especially if the texture turns
out to be a common one like dirt, grass or stone).

Use std::string.append to get rid of the temporary which
solves both issues (speed and heap fragmentation).

* Optimize animations in client

Each time an animated node is updated, an unnecessary copy of
the texture name is created, littering the heap with lots of
fragments. This can be specifically troublesome when looking
at oceans or large lava lakes as both of these nodes are
usually animated (the lava animation is pretty visible).
Convert the parameter of GenericCAO::updateTextures to a
const reference to get rid of the unnecessary copy.

There is a comment stating "std::string copy is mandatory as
mod can be a class member and there is a swap on those class
members ... do NOT pass by reference", reinforcing the
belief that the unnecessary copy is in fact necessary.
However one of the first things the code of the method does
is to assign the parameter to its class member, creating
another copy. By rearranging the code a little bit this
"another copy" can then be used by the subsequent code,
getting rid of the need to pass the parameter by value and
thus saving that copying effort.

* Optimize chat console history handling

The GUIChatConsole::replaceAndAddToHistory was getting the
line to work on by value which turns out to be unnecessary.
Get rid of that unnecessary copy by converting the parameter
to a const reference.

* Optimize gui texture setting

The code used to set the texture for GUI components was
getting the name of the texture by value, creating
unnecessary performance bottleneck for mods/games with
heavily textured GUIs. Get rid of the bottleneck by passing
the texture name as a const reference.

* Optimize sound playing code in GUIEngine

The GUIEngine's code receives the specification of the sound
to be played by value, which turns out to be most likely a
mistake as the underlying sound manager interface receives
the same thing by reference. Convert the offending parameter
to a const reference to get rid of the rather bulky copying
effort and the associated performance hit.

* Silence CLANG TIDY warnings for unit tests

Change "std::string" to "const std::string &" to avoid an
unnecessary local value copy, silencing the CLANG TIDY
process.

* Optimize formspec handling

The "formspec prepend" parameter was passed to the formspec
handling code by value, creating unnecessary copy of
std::string and slowing down the game if mods add things like
textured backgrounds for the player inventory and/or other
forms. Get rid of that performance bottleneck by converting
the parameter to a const reference.

* Optimize hotbar image handling

The code that sets the background images for the hotbar is
getting the name of the image by value, creating an
unnecessary std::string copying effort. Fix that by
converting the relevant parameters to const references.

* Optimize inventory deserialization

The inventory manager deserialization code gets the
serialized version of the inventory by value, slowing the
server and the client down when there are inventory updates.
This can get particularly troublesome with pipeworks which
adds nodes that can mess around with inventories
automatically or with mods that have mobs with inventories
that actively use them.

* Optimize texture scaling cache

There is an io::path parameter passed by value in the
procedure used to add images converted from textures,
leading to slowdown when the image is not yet created and
the conversion is thus needed. The performance hit is
quite significant as io::path is similar to std::string
so convert the parameter to a const reference to get rid of
it.

* Optimize translation file loader

Use "std::string::append" when calculating the final index
for the translation table to avoid unnecessary temporary
strings. This speeds the translation file loader up
significantly as std::string uses heap allocation which
tends to be rather slow. Additionally, the heap is no
longer being littered by these unnecessary string
temporaries, increasing performance of code that gets
executed after the translation file loader finishes.

* Optimize server map saving

When the directory structure for the world data is created
during server map saving, an unnecessary value passing of
the directory name slows things down. Remove that overhead
by converting the offending parameter to a const reference.
2019-05-18 17:19:13 +02:00
ANAND ︻气デ═一
568694122c Revert "Inventory: Make addItem for empty ItemStacks respect max stack size" (#8519)
Revert commit e6a9e60
2019-05-12 18:07:15 +01:00
ANAND ︻气デ═一
06a749c386 Move HTTP request logging to infostream (#8526) 2019-05-12 17:55:14 +01:00
ANAND ︻气デ═一
8e3b63bd28 Define operators == and != for ItemStack 2019-05-11 18:48:27 +02:00
ANAND
c4578aefe7 PlayerSAO::setHP - Don't call on_hpchange callbacks if HP hasn't changed 2019-04-29 14:08:34 +02:00
Paramat
ad8d68c06a
Remove unnecessary CSM warning (#8485) 2019-04-28 00:44:26 +01:00
sofar
b839a6dd54 Force send a mapblock to a player (#8140)
* Force send a mapblock to a player.

Send a single mapblock to a specific remote player.

This is badly needed for mods and games where players are teleported
into terrain which may be not generated, loaded, or modified
significantly since the last player visit.

In all these cases, the player currently ends up in void, air, or
inside blocks which not only looks bad, but has the effect that the
player might end up falling and then the server needs to correct for
the player position again later, which is a hack.

The best solution is to send at least the single mapblock that the
player will be teleported to. I've tested this with ITB which does this
all the time, and I can see it functioning as expected (it even shows
a half loaded entry hallway, as the further blocks aren't loaded yet).

The parameter is a blockpos (table of x, y, z), not a regular pos.

The function may return false if the call failed. This is most likely
due to the target position not being generated or emerged yet, or
another internal failure, such as the player not being initialized.

* Always send mapblock on teleport or respawn.

This avoids the need for mods to send a mapblock on teleport or
respawn, since any call to `player:set_pos()` will pass this code.
2019-04-28 00:42:13 +01:00
ANAND
d71e1e0949 Improve readability of debug menu by using '|' (#8488)
* Improve readability of debug menu by using '|'

* Restore whitespace to separate yaw and cardinal direction

Co-Authored-By: ClobberXD <ClobberXD@gmail.com>
2019-04-27 12:45:44 +02:00
ANAND
d0f0ceaf66 Range-limit value passed to PlayerSAO::set{HP|Breath} (#8264) 2019-04-27 12:45:20 +02:00
Muhammad Rifqi Priyo Susanto
695d9edcd4 Use player as starting point instead of camera when pointing node (#8261)
Same pointing area on both camera modes.
This fix is inapplicable for non-crosshair input.
2019-04-27 12:44:56 +02:00
SmallJoker
f409f44765 Correct the checkbox selection box position (#8246)
Remove m_btn_height dependency, replace with the text and checkbox size.
2019-04-27 00:56:31 +01:00
stujones11
cff1e9ca27 Android: Clear chat open flag on cancel or completion (#8478) 2019-04-19 12:06:47 +02:00
paramat
38b94f248a Attend to review, re-arrange blank lines, update lua_api.txt 2019-04-14 22:21:51 +01:00
Pedro Gimeno
12a63021d0 Fix regression in automatic_face_movement_max_rotation_per_sec
Values <= 0 should make the yaw change instant. This worked in 0.4.16 but was broken in 089f59458286.

Per bug report by oil_boi_minetest on IRC.
2019-04-14 22:21:51 +01:00
Jozef Behran
007ce24a11 Various network performance improvements (#8125)
* Optimize packet construction functions

Some of the functions that construct packets in
connection.cpp are using a const reference to get the raw
packet data to package and others use a value passed
parameter to do that. The ones that use the value passed
parameter suffer from performance hit as the rather bulky
packet data gets a temporary copy when the parameter is
passed before it lands at its final destination inside the
newly constructed packet. The unnecessary temporary copy
hurts quite badly as the underlying class (SharedBuffer)
actually allocates the space for the data in the heap.

Fix the performance hit by converting all of these value
passed parameters to const references. I believe that this
is what the author of the relevant code actually intended
to do as there is a couple of packet construction helper
functions that already use a const reference to get the
raw data.

* Optimize packet sender thread class

Most of the data sending methods of the packet sender thread
class use a value passed parameter for the packet data to be
sent. This causes the rather bulky data to be allocated on
the heap and copied, slowing the packet sending down. Convert
these parameters to const references to avoid the performance
hit.

* Optimize packet receiver thread class

The packet receiver and processor thread class has many
methods (mostly packet handlers) that receive the packed data
by value. This causes a performance hit that is actually
worse than the one caused by the packet sender methods
because the packet is first handed to the processPacket
method which looks at the packet type stored in the header
and then delegates the actual handling to one of the
handlers. Both, processPacket and all the handlers get the
packet data by value, leading to at least two unnecessary
copies of the data (with malloc and all the slow bells and
whistles of bulky classes).

As there already is a few methods that use a const reference
parameter for the packet data, convert all this value passed
packets to const references.
2019-04-14 21:56:38 +01:00
Paramat
4d2ad7c2b2
World start time: Move to first full light (day night ratio = 1000) (#8410)
6125 is the time of first full light according to 'get_node_light()',
and the time of first full light visually when basic shaders are on.
This is the optimum default new world start time, taking all possible
games into account.
The previous time assumed a game similar to Minetest Game. Games
should set this setting themselves according to their needs.
2019-04-13 01:46:38 +01:00
Vitaliy
faa419fc8b Add Irrlicht-specific smart pointer (#6814) 2019-04-12 17:27:39 +01:00
Paul Ouellette
22ad820aa4 Add node field to PlayerHPChangeReason table (#8368) 2019-04-11 20:45:39 +01:00
ANAND
8306f7d2e2 util/hex.h: Remove whitespace-only line (#8460) 2019-04-08 19:40:02 +01:00
Paramat
0cc85a7dc6
daynightratio.h: Improve codestyle, minor optimisations (#8453) 2019-04-08 00:37:52 +01:00
Paramat
a222ff4c02
Android settings: Use 'simple' leaves instead of 'fancy' (#8440)
'Fancy' leaves are intensive to render.
Also remove the unnecessary duplicated setting of 'chunksize'.
2019-04-07 19:20:00 +01:00
Jozef Behran
0c90ab4f6c Optimize random turns in dungeongen (#8129)
It turns out there is no need to return the new value and
preserve the old one in random_turn, the procedure can be
made to modify the value in-place. This saves quite a bunch
of parameter and return value copying.
2019-04-07 19:08:27 +02:00
adrido
25f231a0e0 Find PostgreSQL correctly (#8435) 2019-04-07 18:45:25 +02:00
starling13
1db4ae96b1 util/hex.h: Reserve result space in hex_encode()
Reserve enough space for the result of hex_encode() to eliminate reallocations
2019-04-07 12:01:42 +02:00
ANAND
3deaa7cf57 Add deprecation warnings for ObjectRef:get/set_attribute (#8443) 2019-04-07 12:00:57 +02:00
Paramat
5b8363af00
Stabilise 'day night ratio' to fix object brightness flicker (#8417)
Previously, when basic shaders were enabled, the function
time_to_daynight_ratio() returned values jumping between 149 and 150
between times 4375 and 4625, and values jumping between 999 and 1000
between times 6125 and 6375, (and the corresponding times at sunset)
due to tiny float errors in the interpolation code.

This caused the light level returned by blend_light() to jump between
14 and 15, which became noticeable recently as those light levels were
given different visual brightnesses.

Add early returns to avoid the problematic interpolation, and to
avoid unnecessary running of the loop.
2019-04-04 23:30:10 +01:00
ANAND
d111865890 Change sign of pitch angle in debug menu (#8438)
Co-Authored-By: ClobberXD <ClobberXD@gmail.com>
2019-04-04 22:42:18 +01:00
rubenwardy
4f7674d448 Change pitch fly binding to 'P', add to change keys menu (#8314) 2019-04-03 21:37:30 +01:00
Loic Blot
a4677496f3 Fix comments 2019-03-31 20:49:39 +02:00
Loïc Blot
64bdd4b509 Create ServerThread earlier in the startup process 2019-03-31 20:49:39 +02:00
Loïc Blot
b55fc3d773 mapgen: drop mapgen id from child mapgens.
This id must be owned by the child mapgen and never be set to a misc value by a developer

Also use nullptr in some places
2019-03-31 20:49:39 +02:00
Loïc Blot
b3716a03a6 EmergeManager::initMapgens use FATAL_ERROR if and drop boolean return
We never handle the boolean return, also init twice is a coding error, not a runtime error
2019-03-31 20:49:39 +02:00
HybridDog
ab322fc5aa Use unordered_map instead of map for craft definitions (#8432) 2019-03-31 19:26:17 +02:00
Paramat
42e1a12714
Require 'waving = 3' in a nodedef to apply the liquid waving shader (#8418)
Makes the liquid waving shader per-nodedef like waving leaves/plants,
instead of being applied to all liquids.
Like the waving leaves/plants shaders, the liquid waving shader can
also be applied to meshes and nodeboxes.

Derived from a PR by t0ny2.
2019-03-27 00:18:43 +00:00
Paramat
5e7662ca16
Dungeons: Do not remove nodes that have 'is_ground_content = false' (#8423)
Like randomwalk caves, preserve nodes that have 'is_ground_content = false',
to avoid dungeons that generate out beyond the edge of a mapchunk destroying
nodes added by mods in 'register_on_generated()'.

Issue discovered by, and original PR by, argyle77.
2019-03-26 03:56:57 +00:00
rubenwardy
d0a1a29ab3
Prevent multi-line chat messages server-side (#8420) 2019-03-26 01:18:52 +00:00
sfan5
5b99abb847 Fix texture rotation for wallmounted nodeboxes
fixes #8358
2019-03-19 22:36:51 +01:00
sfan5
426bdba7fb httpfetch: Disable IPv6 here too if requested by settings (#8399) 2019-03-18 15:06:27 +01:00
Paramat
c0fb5dd317 num_emerge_threads: Initialise value to cope with setting syntax error (#8396) 2019-03-18 11:19:53 +01:00
Wuzzy
9f1b98b997 Add newline before itemstring in item tooltip (#8213) 2019-03-17 13:55:02 +01:00
Loïc Blot
02a23892f9 LINT fixes since recent tooling update 2019-03-14 12:30:13 +01:00
Loïc Blot
a6a04c4b5b Update our tooling (Clang 5 -> 7, GCC 7 -> 8)
This change permits to use up-to-date compilers, clang-tidy and
clang-format

It also refactor the tidy/format step to drop the binary selection from
scripts and perform it directly in travis
2019-03-14 12:30:13 +01:00
Paramat
aafbdd442f
Valleys mapgen code rewrite (#8101)
Shorter, simpler, clearer and more consistent with other mapgens,
while preserving functionality.
Base terrain shape is unchanged.
With the 'vary river depth' option disabled, river surface level
is unchanged.
Behaviour of the 4 heat/humidity/river depth options is very
slightly changed due to bugfixes and code cleanup (the mapgen is
'unstable').
Apply heat and humidity gradients above water_level instead of
above y = 0.
2019-03-14 00:27:16 +00:00
Loïc Blot
e22a69d61a Drop GUIConfirmRegistration::m_address unused field 2019-03-12 16:53:21 +01:00
rubenwardy
38f6e7a198 Fix cast from const by accessing string data directly (#8354)
Fixes #8327
2019-03-12 08:58:02 +01:00
rubenwardy
1e3e4fb649 HPChange Reason: Fix push after free, and type being overwritten (#8359)
* HPChange Reason: Fix push after free, and type being overwritten

Fixes #8227 and #8344
2019-03-12 08:56:56 +01:00
rubenwardy
3b25b807f3
Fix serialization of std::time_t by casting to u64 first (#8353)
Fixes #8332
2019-03-10 18:53:02 +00:00
Ragulan R
c8914664a3 Display pitch angle in debug menu (#8321) 2019-03-10 11:16:27 +01:00
Paramat
0b492f82f7
Confirm registration GUI: Remove positional strings to fix Windows bug (#8258)
Positional strings don't work on some Windows builds.
Remove server address string, leave player name string present.
2019-03-10 01:49:03 +00:00
HybridDog
431d8a9b83 Abort when trying to set a not registered node (#7011)
I removed the MapNode constructor which takes a nodename and gives the node's id or CONTENT_IGNORE
The code which used this constructor (two places) now handles the situation of not registered nodes correctly:
* minetest.set_node and similar functions make minetest crash when a not registered node is passed
* reverting a node with rollback aborts if the node is not registered
2019-03-07 08:31:25 +01:00
Jozef Behran
bb35d06225 Optimize string handling in path search (#8098)
Use "append" method to construct the various game paths
instead of wasteful string concatenation. Additionally, use a
temporary to extract and reuse a result of a few common
subexpressions to further reduce the overhead.
2019-03-07 08:20:33 +01:00
Jozef Behran
007c8440d7 Optimize interaction distance checker (#8193)
The "what" parameter is being passed by value, most likely by
accident as the type is "const std::string". Convert it to a
reference by adding the missing "&".
2019-03-07 08:19:13 +01:00
rubenwardy
ac86d04784 Fix detach inventory serialisation (#8331) 2019-03-07 07:41:21 +01:00
rubenwardy
82c6363559
Fix incorrect string length check after cast 2019-03-06 22:24:39 +00:00
rubenwardy
c735497a65 Fix clang tidy error due to incorrect use of quotes for character 2019-03-06 14:41:37 +00:00
Paramat
1c87d57e1d
Change 'num_emerge_threads' default to 1 (#8303) 2019-03-05 22:58:38 +00:00
HybridDog
ee698770b9 Fix --color command line parameter ignorance (#7173)
* Fix color command line parameter ignorance

* coloured log: Support detecting the tty on windows

* Print an error message when setting something invalid as color mode instead of silently using mode never

* Revert "coloured log: Support detecting the tty on windows"

This reverts commit 4c9fc6366487ac0e6799e181796ca594797bb6f8.
It didn't work for travis and belongs to a separate PR

* Allow adjusting the log color with an environment variable

If --color is not passed to minetest,  is used to decide on the log colorization.
Minetest settings can not be used instead of an environment variable because logs may appear before loading them.

* fix empty if body
2019-03-05 08:14:33 +01:00
Benjamin Lindley
e19565c170 Replace for loop with call to standard library function (#8194)
This loop makes multiple passes over m_stack (type std::list) in order to remove all elements with a specified value. Replacing the loop with a call to std::list::remove does the same job, but in only one pass.
2019-03-05 08:13:15 +01:00
rubenwardy
5d2624ab82 Hide uninstall package button on unmodifiable paths (#8255) 2019-03-05 08:12:58 +01:00
sofar
b5defcffba Add referer to remote media requests. (#8135)
This sends the following header to a remote media server:

    Referer: minetest://<server_name>:port

This was verified with CTF and the Minetest Public Remove Media
server. If the servername was a plain IPv6 address it will
contain `:` characters and will be encapsulated in `[]` to
be a valid URI.
2019-03-05 08:12:02 +01:00
sofar
61e5fbab72 getS16NoEx() returns true unless syntactical error in conf. (#8304)
The getS16NoEx() handler will return true unless there is a
`[num_emerge_threads]` line in the `minetest.conf` at which
point the excption handler part is reached. Due to the fact that
`defaultsettings.cpp` has a default value set for this setting,
that never will happen.

Because of this, the code will never check the number of threads on
the system, and keep `nthreads = 0`. If that happens, the value is
changed to `1` and only 1 emerge thread will be used.

The default should be set to `1` instead, due to the potential unsafe
consequences for the standard sqlite map files, but that should be a
separate commit that also adds documentation for that setting. This
commit focuses on removing this `hiding` bug instead.
2019-03-05 08:11:13 +01:00
adrido
ad0f20835c Don't include and link to gettext if gettext is not found (#8305) 2019-03-02 10:56:01 +01:00
Loïc Blot
170dd409cb
Fix particle spawners not visible since CSM spawner implementation (#8289)
* Drop the ID mapper, use a big u64 instead. This will permit to resync server ids properly with the manager code
* Modernize some code parts (std::unordered_map, auto)
* generate id on client part on U32_MAX + 1 ids, lower are for server ids
2019-03-01 20:16:11 +01:00
Loïc Blot
111f1dc9c5 Revert "Revert CSM particles commit to fix particle spawner bug for 5.0.0 (#8288)"
This reverts commit 01cd63bd3bca0192dab2834faf414b022706a77e.
2019-02-26 08:53:53 +01:00
Paramat
01cd63bd3b
Revert CSM particles commit to fix particle spawner bug for 5.0.0 (#8288)
Reverts 5dab7426451842793b183fbd961ad2ae83c8acbd
"[CSM] Add functions to create particles and particlespawners."
2019-02-26 04:26:25 +00:00
Paramat
ae1caba6aa
Update minetest.conf.example and settings_translation_file.cpp (#8278) 2019-02-23 20:24:59 +00:00
Nathanaël Courant
eeb67627ec Fix files with CRLF line endings in translations (#8280) 2019-02-23 19:55:54 +00:00
SmallJoker
1942660955 Minimap: Fix radar restriction broken by 9649e47
Server-side radar restriction is now possible again
Thanks to @pgimeno for this nice catch.
2019-02-23 15:54:53 +01:00
Paramat
20fb04d9fb
Attend to LINT sillyness (#8276) 2019-02-23 02:41:36 +00:00
ANAND
242c9bc36e Remove 's' from 'automatic forwards' (#8272) 2019-02-23 01:12:33 +00:00
ANAND
7a0e52acd6 Revert RTT fixes (#8187)
The reverted commit 968ce9af598024ec71e9ffb2d15c3997a13ad754
is suspected (through the use of bisection) of causing network slowdowns.
Revert for now as we are close to release.
2019-02-15 23:39:22 +00:00
random-geek
2153163cbd Fix coloured fog in main menu (#8181)
Fixes #4727. The issue was due to the video driver fog colour never getting reset after closing the game.
2019-02-15 20:44:21 +01:00
Loïc Blot
3dafc007a9 LINT fix 2019-02-15 12:27:29 +01:00
Wuzzy
88c68ce8ec Don't regain breath while in ignore node (#8218)
* Don't regain breath while in ignore node

Fixes #8217
2019-02-15 12:22:30 +01:00
Wuzzy
f290d01abe Update minetest.conf.example, settings strings and locale files (#8230) 2019-02-14 22:38:24 +00:00
rubenwardy
a8311ad57f Fix extract zip writing lowercase files (#8221) 2019-02-14 20:03:45 +00:00
SmallJoker
ffb17f1c9a Consistent HP and damage types (#8167)
Remove deprecated HUDs and chat message handling.
Remove unused m_damage variable (compat break).
HP: s32 for setter/calculations, u16 for getter.
2019-02-10 23:03:26 +00:00
SmallJoker
ba5a9f2b36
Slippery: Do not apply when swimming (#8198) 2019-02-10 17:04:04 +01:00
SmallJoker
6d6a813614
Autojump: Disable in fly mode, support continuous forward (#8200)
Correctly disable in fly mode (issue #8199)
Also autojump in continuous forward mode (issue #8201)
2019-02-09 21:44:04 +01:00
Loic Blot
ff5d4ffe1c
Fix Address::isLocalhost algorithm 2019-02-09 19:52:56 +01:00
rubenwardy
7796a3118d
Disable confirmation dialog on localhost 2019-02-09 19:52:56 +01:00
SmallJoker
b7e1bca28c numeric: Fix clang, broken since d5456da 2019-02-09 18:33:31 +01:00
Wuzzy
f5bdc04ab5 Don't append itemname to itemname in tooltip (#8176) 2019-02-09 15:46:02 +01:00
Paul Ouellette
d5456da69d Use true pitch/yaw/roll rotations without loss of precision by pgimeno (#8019)
Store the rotation in the node as a 4x4 transformation matrix internally (through IDummyTransformationSceneNode), which allows more manipulations without losing precision or having gimbal lock issues.

Network rotation is still transmitted as Eulers, though, not as matrix. But it will stay this way in 5.0.
2019-02-07 21:26:06 +00:00
random-geek
fc566e2e10 Fix cloud color in loading screen and main menu (#8174) 2019-02-04 19:11:02 +00:00
random-geek
2ae794ac45 Update color of main menu clouds (#8172) 2019-02-04 00:12:15 +01:00
rubenwardy
626b0b7e6a
Add setting to hide mature content from ContentDB 2019-02-03 17:54:56 +00:00
rubenwardy
9a071d66a5 Fix core.download_file() creating empty files on HTTP error 2019-02-03 17:31:28 +00:00
Leonid Bobrov
339341ba4e DragonFly BSD is somewhat identical to FreeBSD (#8159) 2019-02-03 09:53:54 +01:00
Loïc Blot
70672e1cb7
Force player save before kicking on player shutdown (#8157) 2019-02-03 09:11:45 +01:00
Nathanaël Courant
91e5a33cfa Move missing translations warnings to verbosestream (#8156)
They should not spam the console and logs.
2019-02-02 12:00:06 +01:00
Paramat
d521e61ba7
Settings: Slightly increase block generate, block send, object send distances (#8147) 2019-01-31 19:28:14 +00:00
rubenwardy
572ba83b30 Content store: Fix storage leak by storing screenshots in cache (#8137) 2019-01-31 16:35:55 +00:00
Muhammad Rifqi Priyo Susanto
9126e1791d Add setting to disable confirmation on new player registration (#8102) 2019-01-26 19:26:37 +00:00
Paul Ouellette
ded522b2ee Fix pkgmgr game install with RUN_IN_PLACE=0 (#8113) 2019-01-26 14:12:20 +01:00
Paramat
922e6ff57e
blitToVManip: Check out-of-bounds using node position not index (#8127)
Previously, when using 'place on vmanip' to add a schematic to a
lua voxelmanip, if part of the schematic was outside the voxelmanip
volume, the outside part would often appear in a strange place
elsewhere inside the voxelmanip instead of being trimmed off.
This was due to the out-of-bounds check checking the index.

A position outside the voxelmanip can have an index that satisfies
'0 <= index <= voxelmanip volume', causing the node to be placed
at a strange position inside the voxelmanip.

Use 'vm->m_area.contains(pos)' instead.
Move index calculation to later in the code to optimise.
2019-01-25 19:01:00 +00:00
Paramat
bc1e54764b Fix warnings about dungeongen.cpp memcpy() and unused variable in MapBlock::deSerializeNetworkSpecific() (#8122)
* Fix warning about dungeongen.cpp memcpy()

* Fix unused variable in MapBlock::deSerializeNetworkSpecific()

* Fix unused variable a simpler way
2019-01-22 22:13:06 +01:00
Jozef Behran
33afe1fb56 Fix randomly rejected form field submits (#8091)
If a formspec is submitted from a form fields handling
callback of another form (or "formspec shown from another
formspec"), the fields submitted for it can get
rejected by the form exploit mitigation subsystem with a
message like "'zorman2000' submitted formspec
('formspec_error:form2') but server hasn't sent formspec to
client, possible exploitation attempt" being sent to logs.
This was already reported as #7374 and a change was made
that fixed the simple testcase included with that bug
report but the bug still kept lurking around and popping
out in more complicated scenarios like the advtrains TSS
route programming UI.

Deep investigation of the problem revealed that this
sequence of events is entirely possible and leads to the
bug:

  1. Server: show form1
  2. Client *shows form1*
  3. Client: submits form1
  4. Server: show form2
  5. Client: says form1 closed
  6. Client *shows form2*
  7. Client: submits form2

What happens inside the code is that when the server in
step 4 sends form2, the registry of opened forms is
updated to reflect the fact that form2 is now the valid
form for the client to submit. Then when in step 5 client
says "form1 was closed", the exploit mitigation subsystem
code deletes the registry entry for the client without
bothering to check whether the form client says was
closed just now is indeed the form that is recorded in
that entry as the valid form. Then later, in step 7 the
client tries to submit its valid form fields, these will
be rejected because the entry is missing.

It turns out the procedure where the broken code resides
already gets the form name so a simple "if" around the
offending piece of code fixes the whole thing. And
advtrains TSS agrees with that.
2019-01-21 09:53:09 +01:00
SmallJoker
80b9015939 Advanced settings noiseparams: Remove '}' left in .conf
Previously, when editing noiseparams then restoring them to the default,
the final '}' was not removed from minetest.conf.
2019-01-19 18:31:41 +00:00
Jozef Behran
6e37fdc21d Optimize subgames search a little bit (#8096)
Reserve space for the list of games in findWorldSubgame. The
performance gain is pretty much negligible but this change
also gets rid of a performance warning by CLANG TIDY.
2019-01-18 10:47:50 +01:00
Paul Ouellette
3fce27ece5 Fix some misspellings (#8104) 2019-01-16 13:39:13 +01:00
SmallJoker
ed1415f78d
world.mt: Only accept true/false/nil values (#8055)
This patch will make distinguishable mods in modpacks possible in the future
`nil` checks are required to provide backwards-compatibility for fresh configured worlds
2019-01-13 16:22:32 +01:00
Jozef Behran
a51909bb64 Speed up the craft definition handling (#8097)
The craft definition handling code that collects the names of
the craftable nodes suffers from vector reallocation
performance hits, slowing down instances with lots of
crafting recipes (VanessaE's DreamBuilder and most public
server some to my mind when thinking about this). As in each
instance the size of the resulting vector is already known,
add a reserve() call before the offending loops to allocate
the needed chunk of memory within the result vector in one
go, getting rid of the overhead.
2019-01-13 15:11:47 +01:00
Jozef Behran
5a00b11895 Optimize path finalization in pathfinder (#8100)
The pathfinder needs quite a bunch of items to add to the
resulting list. It turns out the amount of the space needed
for the finalized path is known in advance so preallocate it
to avoid a burst of reallocation calls each time something
needs to look for a path.
2019-01-12 16:57:26 +01:00
Paul Ouellette
a18c310adb Make sqlite3 the default auth backend (#8085) 2019-01-10 07:54:20 +01:00
Loic Blot
f4099192e3
Import strstr function from FreeBSD 11 libc 2019-01-10 00:17:08 +01:00
Loïc Blot
0acdf93683 Android build fixes
This fixes #8079
2019-01-09 14:39:43 +01:00
Loïc Blot
95d4ff6d1b
Fix a crash on Android with Align2Npot2 (#8070)
* Fix a crash on Android with Align2Npot2

glGetString can be NULL. If stored in a string it triggers a SIGSEGV.
Instead do a basic strstr and verify the pointer
* Better Align2Npot2 check (+ performance)
2019-01-07 17:05:18 +01:00
DS
07c1c72aae Fix wrong code comment (#8061)
"Get core.registered_on_chat_messages" to "Get core.registered_on_player_receive_fields" where `core.registered_on_player_receive_fields` is gotten
2019-01-06 17:21:04 +01:00
SmallJoker
a122ba0ef4 Fix various bugs (Anticheat, Lua helpers) (#8013)
* Fix various bugs (Anticheat, Lua helpers)

Anticheat: Use camera position instead of player position for shoot line calculations
Lua helpers: Increase 'i' to not overwrite earlier added table values

* Remove lag compensation

* * 1.5 for larger selection boxes
2019-01-06 10:24:44 +01:00
rubenwardy
70bf3439ab Deprecate modpack.txt and use modpack.conf instead (#7892)
* Deprecate modpack.txt and use modpack.conf instead
2019-01-06 10:23:35 +01:00
Loïc Blot
9854340c0b Drop libgmp on Android and use mini-gmp (#8047) 2019-01-04 16:45:37 +01:00
Loïc Blot
022b1eca0b
Make sqlite3 default auth & player backends for new worlds (#8043)
* Make sqlite3 default auth & player backends for new worlds

Also notify about auth backend depreciation
2019-01-04 12:55:07 +01:00
Loïc Blot
4a7c97c5f6 Fix on_successful_save -> onSuccessfulSave 2019-01-04 11:33:04 +01:00
Loïc Blot
c1d7dbfc38 Fix various player save issues (performance penalty on sql backends + bugs)
* PostgreSQL & SQLite3 doesn't setModified(false) on RemotePlayer, then player is saved on each server save call. This results in heavy useless writes.
* PostgreSQL & SQLite3 ack engine meta write whereas db commit hasn't been performed. If commit failed write has failed. We mustn't notify engine write is done.
* serializing player meta must not setModified(false) because it didn't ensure write has been done
* add RemotePlayer::on_successfull_save callback to do the flag update on a successful save
2019-01-04 10:20:04 +01:00
Loïc Blot
0717719073 Player file directory must be only created when using file backend.
Also ensure on each player save that the directory exists
2019-01-04 10:06:46 +01:00
sofar
cf224c9d6b Remove remote media compatibility mode. (#8044)
The fallback code shouldn't be needed and is a remnant of the GET
method that old media servers use. Clients using it are likely
to just waste bandwidth and having to download the media again
through the normal transfer from server method. The most reliable
method is to get all missing textures therefore from the server
directly and not spam the remote media server with 404s.
2019-01-04 00:26:08 +01:00
SmallJoker
bba4563d89 Proselytize the network. Use IEEE F32 (#8030)
* Proselytize the network. Use IEEE F32
* Remove unused V2F1000 functions
2019-01-03 17:04:26 +01:00
Paramat
ceacff13a6 CSM restrictions: Make 'LOAD_CLIENT_MODS' disable loading of 'builtin' (#8000)
Previously, when the CSM restriction 'LOAD_CLIENT_MODS' was used a
client was still able to add CSM code to 'builtin' to bypass that
restriction, because 'builtin' is not yet verified.

Until server-sent CSM and verifying of 'builtin' are complete, make
'LOAD_CLIENT_MODS' disable the loading of builtin.

Clarify code comments and messages to distinguish between client-side
modding and client-side scripting. 'Scripting' includes 'builtin',
'modding' does not.
2019-01-03 12:10:07 +01:00
HybridDog
c6f784f43b Add minetest.load_area (#8023) 2018-12-31 00:32:54 +00:00
random-geek
aa5ec2ec02 Extend pitch fly mode to swimming (#7943) 2018-12-31 00:07:30 +00:00
Loïc Blot
a5197eaebc
CSM: add requested CSM_RF_READ_PLAYERINFO (#8007)
* CSM: add requested CSM_RF_READ_PLAYERINFO

This new CSM limit permit to limit PLAYERINFO read from server.

It affects get_player_names call
2018-12-24 10:51:10 +01:00
SmallJoker
67049eba3c Fix entity rotation in existing worlds (#7989) 2018-12-23 23:22:27 +00:00
Vitaliy
309e158fc8 mapnode: add const/noexcept (#8009) 2018-12-22 17:36:24 +01:00
rubenwardy
0990ddb3bb Android: Fix memory leak when displaying images in the mainmenu (#8011) 2018-12-22 08:46:41 +01:00
SmallJoker
2a69f874da reportMetadataChange; Silence clang warnings 2018-12-21 19:05:29 +01:00
stujones11
d994f7ca5f Fix more transparency issues with ogles2 driver (#8005) 2018-12-20 23:40:17 +01:00
stujones11
ba07a8b872 Android: Move touchscreen rare controls inline with settings icon (#8006) 2018-12-20 21:11:57 +00:00
Kevin Abrams
b7eb81fed9 Add command line option to load password from file (#7832) 2018-12-18 20:15:14 +01:00
SmallJoker
80eb762af1 ieee_float: Silence compiler warning
Trivial issue reported by @pgimeno
2018-12-18 19:50:07 +01:00
Pedro Gimeno
8e4095f068 Fix the part of the float test that requires IEC559/IEEE754 compliance
GCC and CLang compilers fail to support full IEC559 compliance required for the test, when certain compiler flags are active. This patch implements a heuristic that checks for the most common flag in GCC and CLang, plues an extra check which GCC disables when it's not compliant, to hopefully catch most cases where it can't run.
2018-12-18 12:27:23 +01:00
Pedro Gimeno
e7367f0fa5 Fix C++11 violation that broke clang on Debian Stretch 2018-12-16 20:08:25 +01:00
Loïc Blot
eda35100b6
Add an activeobject manager to hold active objects (#7939)
* Add an activeobject manager to hold active objects
* Add unittests
2018-12-13 20:18:54 +01:00
SmallJoker
839e935ba0 Network: Send IEEE floats (#7768) 2018-12-13 11:20:57 +01:00
Wuzzy
8471d027b9 Make showOverlayMessage strings translatable (#7964) 2018-12-13 11:05:38 +01:00
Vitaliy
3bfb8284b8 Make MapNode handle paramtype2≠leveled properly (#7958) 2018-12-12 00:02:09 +01:00
Loïc Blot
a8575295d5
porting.cpp: better minetest support on BSD
BSD folder detection is pretty raw, just use the same detection as Linux
2018-12-11 17:35:39 +01:00
rubenwardy
f318366c20 Fix ContentDB packages timing out by using download_file instead (#7891) 2018-12-11 04:43:14 +00:00
Alex
a833bee9ed Add object visual type 'item' (#7870) 2018-12-11 02:57:04 +00:00
Update Script
98a72b9d45 Update minetest.conf.example and run updatepo.sh (#7947) 2018-12-09 14:16:58 +01:00
Martin Renold
b02effdab9 Fix crash if display resolution is not set (#7950)
On my wayland / gnome3 setup DisplayHeightMM() returns 0. This resulted in a
misleading startup error suggesting to fix my font paths.
2018-12-08 16:26:04 +01:00
Paramat
f0dca284b3
Main menu style: Set to 'full' for Android, remove 'auto' option (#7936) 2018-12-06 23:52:11 +00:00
Paramat
08884d258b
Draw all horizons and sky base, in front of stars (#7932)
Move star draw to before sun glow texture draw and before sun draw,
not currently essential but the logical order. Will be necessary if
a 'no far ground' option is added, to draw stars behind the sun.
2018-12-06 03:56:35 +00:00
CoderForTheBetter
8cc75c053f Fix player rotations (#7941) 2018-12-05 09:28:09 +01:00
SmallJoker
3d66622772
Send only changed node metadata to clients instead of whole mapblock (#5268)
Includes newer style changes and fixes by est31

Improve the block position de-serialization
Add type NodeMetadataMap
2018-12-04 20:37:48 +01:00
Loïc Blot
b362e04ebf Revert "Fix another GCC warning"
This reverts commit e6811184d5824bf7d8febc157495dbecd3e4e0f7.
2018-12-04 16:45:07 +01:00
Loïc Blot
75a26b10ab Add testWrapDegrees_0_360_v3f unittests 2018-12-04 16:18:17 +01:00
Loïc Blot
e6811184d5 Fix another GCC warning
```
[ 10%] Building CXX object src/CMakeFiles/minetest.dir/client/render/interlaced.cpp.o
cc1plus: warning: -Wabi won't warn about anything [-Wabi]
cc1plus: note: -Wabi warns about differences from the most up-to-date ABI, which is also used by default
cc1plus: note: use e.g. -Wabi=11 to warn about changes from GCC 7
```
2018-12-04 15:57:50 +01:00
Loïc Blot
7f545db977 Fix a stringop-truncation GCC warning
```
minetest/src/filesys.cpp:312:10: warning: ‘char* strncpy(char*, const char*, size_t)’ specified bound 10000 equals destination size [-Wstringop-truncation]
   strncpy(argv_data[2], path.c_str(), 10000);
```
2018-12-04 12:39:19 +01:00
Loïc Blot
39ea1cd428 Fix uninitialized variable peer_id
Reported by GCC

```
minetest/src/server.cpp:996:42: warning: ‘peer_id’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   errorstream << "ProcessData: peer=" << peer_id << e.what() << std::endl;
```
2018-12-04 12:39:10 +01:00
Juozas
94f2d99142 Fix Android build errors (caused by 5f1cd55)
After commit 5f1cd55 touchscreengui.* files were pointing to old file locations
2018-12-03 19:31:20 +01:00
Vanessa Dannenberg
1b0fd195c6 Raise hotbar limit to 32 slots, add associated keybinding options (#7916)
add associated keybinding options
update docs and settingtypes
2018-12-02 23:34:29 +01:00
Paul Ouellette
f6662b01ac Remove unused settings (#7929) 2018-12-02 15:34:25 +01:00
Paramat
ff12630bc9
Draw stars behind the moon (#7928)
This time correctly, by resetting the 'material' to '1' after moon draw.
2018-12-02 07:25:43 +00:00
Paramat
5dd542401a
Slightly alter star appearence time and full brightness time (#7921)
At sunset:
Stars first appear slightly later, at the time the sun disappears over the horizon,
this fixes seeing dark stars in front of the sun horizon glow texture.
Stars reach full brightness slightly earlier at time 20000, not so excessively long
after sunset.

The above behaviour is also applied at sunrise, but of course, time-inverted.
2018-12-02 04:17:05 +00:00
Gaël C
327bad2eaf Added pitch fly mode (#7817)
In pitch fly mode, you fly to the exact direction you are pointing at, using the forward key. Other move directions are also pitched accordingly.
It allows smoother and more complex movements.
Can be enabled/disabled by L key by default (set keymap_pitchfly in minetest.conf)
2018-12-01 10:01:32 +01:00
Paramat
dcf58a3ad0
Fix sky bugs when using sun or moon textures (#7918)
Reverts the render order change of commit
ce2d33eb97238e2e050d065a8f0838749a0b31d0
2018-12-01 05:04:13 +00:00
Quentin Bazin
5f1cd555cd Move client-specific files to 'src/client' (#7902)
Update Android.mk
Remove 'src/client' from include_directories
2018-11-28 20:01:49 +01:00
Michael Muller
ddd9317b73 Clean up stack after script_get_backtrace (#7854)
script_get_backtrace() was leaving its return value on the stack, corrupting
subsequent lua operations for functions that did not immediately return.

This problem can specifically be observed in the case of multiple "groupcaps"
entries, each of which provides the legacy "maxwear" property.  These cause a
backtrace and thus pollute the stack for the following lua_next() call.
2018-11-28 20:01:01 +01:00
CoderForTheBetter
faa358e797 Add Lua methods 'set_rotation()' and 'get_rotation()' (#7395)
* Adds Lua methods 'set_rotation()' and 'get_rotation'. Also changed some method names to be more clear. Instead of an f32 being sent over network for yaw, now a v3f is sent for rotation on xyz axes. Perserved Lua method set_yaw/setyaw so that old mods still work, other wise to set yaw they would need to switch to set_rotation(0, yaw, 0).
2018-11-28 09:38:50 +01:00
stujones11
9519d57017 Make non-formspec modal menus respect gui scale (#7850) 2018-11-26 22:55:24 +01:00
rubenwardy
d83fe16a29 Fix macro warning due to incorrect define conjunction 2018-11-25 12:54:22 +00:00
Paramat
2e37ee9565
CSM: Don't create the client script environment if CSM is disabled (#7874)
Use the CSM death formspec when CSM is enabled and use the engine death formspec when CSM is disabled.
Move the CSM death formspec code to a dedicated file.
2018-11-24 10:41:11 +00:00
texmex
a969635322 MacOS: Fix default sneak key. Improve mouse response (#7885) 2018-11-24 05:21:29 +00:00
Ben Deutsch
93bccb3490 Client-side autojump. Remove Android-only stepheight autojump (#7228)
Works by detecting a collision while moving forward and then
simulating a jump. If the simulated jump is more successful,
an artificial jump key press is injected in the client.

Includes setting and key change GUI element for enabling and
disabling this feature.
2018-11-22 21:47:15 +00:00
stujones11
015e46310a Android: Fix recursive delete (#7882) 2018-11-21 23:06:03 +00:00
Paramat
67b20ff15a
Android settings: Develop adaptive HUD scaling (#7784)
Use font size 14 for phones.
Use x_inches < 3.7 instead of < 3.5 for small phones.
Add a new category x_inches < 6 for larger phones.
Use HUD scaling 0.85 for larger phones.
Use desktop defaults for tablets.
2018-11-18 22:29:45 +00:00
Vitaliy
4900ff0c4b Fix Android build (#7873) 2018-11-18 11:48:16 +01:00
stujones11
3b11288989 Android: Improve UI scaling on smaller high-density displays (#7834)
* Android: Improve UI scaling on smaller high-density displays
2018-11-18 11:31:19 +01:00
Paramat
e5a37543cc
Framed glasslike: Don't use cuboids to draw glass faces (#7828)
Previously, each glass face used drawAutoLightedCuboid() to draw a
flat cuboid. This also disallowed backface culling, making the
backface culling inconsistent with 'glasslike'.

Use code from 'glasslike' to draw glass faces using drawQuad().

Remove long-unknown top/bottom textures feature:
Makes the code simpler and cleaner.
Never documented, long-unknown and not of much use.
2018-11-15 18:45:44 +00:00
Paramat
85b01eacd2
Night sky: Fix brightness threshold for applying night colours (#7859)
Previously, 'time_brightness' never fell below the threshold so
night sky colours were not applied.

Increase the threshold value. But now also set it to a value less
sensitive to possible future small changes in 'time_brightness',
by setting it halfway between the 'time_brightness' values for
darkest night and first stage of dawn.
2018-11-12 22:25:35 +00:00
HybridDog
98ee08904b Enable subtle fall bobbing (#7856)
Set the default value of fall_bobbing_amount to 0.03
2018-11-12 19:34:47 +01:00
rubenwardy
81d55338fa Fix get_server_status() segfault due to uninitialized m_env
Fixes #7857
2018-11-12 14:34:29 +00:00
number Zero
b78698240c Minor changes for IrrLicht 1.9 support 2018-11-11 18:08:15 +01:00
number Zero
4f9c33de64 Disable HW stereo for IrrLicht 1.9 (not supported anymore) 2018-11-11 18:08:15 +01:00
number Zero
d90e3ea88d Drop .NET-specific workaround: _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX 2018-11-11 18:08:15 +01:00
rubenwardy
b1112f663b Content store: Add setting to filter non-free packages (#7766)
Defaulting to hiding in order to help with Debian/etc distribution.
This could be changed at a later date.
2018-11-08 21:59:56 +00:00
SmallJoker
c4f1a709b1 New sneak: Smoothen the climb up event (#7727) 2018-11-08 21:12:39 +00:00
random-geek
3a992ce76d Formspecs: Fix text clipped by scrollbars (#7816) 2018-11-06 22:28:34 +00:00
Paramat
4d4bfb1251
Framed glasslike: Fix z-fighting, improve codestyle (#7826)
Increase inset distance of glass faces that is meant to avoid
z-fighting.
Note: Enabling basic shaders made the z-fighting more likely to
happen.
2018-10-31 10:04:33 +00:00
Paramat
34a5960671
Framed glasslike: Fix and document top/base textures feature (#7824) 2018-10-30 06:41:15 +00:00
stujones11
88ba1c70d3 Remove un-needed header inclusion 2018-10-29 15:37:44 +01:00
stujones11
323c860045 Move touchscreen input handling to base GUIModalMenu class 2018-10-29 15:37:44 +01:00
adrido
2322078fe4 Windows: Cpack wix installer (#6153)
Create CPack WIX msi Installer for RUN_IN_PLACE=0 builds
Correct paths on Windows for RUN_IN_PLACE=0
Install only required font files
Games have their own components, and "minimal" is optional
2018-10-26 21:37:51 +02:00
SmallJoker
45b52f6d5a
Ease selection of entities behind nodes (#7739) 2018-10-26 19:23:33 +02:00
Paramat
622e2235ee
clear_craft: Return false if recipe not found, don't throw error (#7804) 2018-10-24 15:03:21 +01:00
Paramat
e369eb1a9b
Android buttons: Inset 'rare controls', inset and resize 'gear icon' (#7792)
Previously these were both inconsistently close to the screen edge.
'gear icon' has been enlarged to match the width of 'zoom' and 'aux'
buttons.
2018-10-19 04:52:47 +01:00
Wuzzy
40ab3e011d Add disable_repair group to prevent tool repair (#7381) 2018-10-16 05:25:34 +01:00
SmallJoker
0a5e77132a
Add core.remove_detached_inventory (#7684)
Breaks backwards compatibility for good
Bump protocol version
2018-10-10 20:48:58 +02:00
Paramat
b982e45456
F5 debug info: Use full words for NSEW directions for readability (#7461) 2018-10-06 00:53:50 +01:00
SmallJoker
d77f3b3fde Player hand list: require init by mods
Mods will now have to initialize the list/slot in order to define the default player hand.
They may use the inventory callbacks to prevent abuse of this list.
2018-10-04 20:42:38 +02:00
Paramat
1413b722a7
Dig particles: Various improvements (#7714)
Improve codestyle.
Add clarifying comments.
Use 'movement_gravity' setting and physics override instead of hardcoded value.
Halve number of particles in final 'node dug' burst.
Avoid extremely small, near-invisible particles.
Increase velocity to increase number emerging from within a cubic node.
2018-10-04 04:13:41 +01:00
Treer
84a5fa01ff Fix Mapgen Valleys getSpawnLevelAtPoint() (#7756) 2018-10-03 00:50:21 +01:00
Paramat
dc948382f5
Night clouds: Boost brightness for a moonlit appearence (#7748)
Previously, night clouds were almost indistinguishable from night sky,
especially since a recent commit that made night sky brighter.
They were lacking the beautiful luminosity caused by being lit by the
permanently-full moon.

When 'directional_colored_fog = false' allow the dawn/dusk cloud
brightness boost to apply through the night too.
Set an identical minimum cloud brightness for when
'directional_colored_fog = true'.
2018-10-01 19:43:32 +01:00
SmallJoker
a29bc8e8ba
Remove settings properly (#7676) 2018-09-30 19:57:31 +02:00
Vitaliy
18a8fbf465 Software inventorycube (#7651)
Fixes missing/upside-down images on Android.
2018-09-29 19:40:17 +01:00
SmallJoker
b9343a7da4
Fix temporary path crash in TestAuthDatabase (#7753)
The constructor of TestAuthDatabase was called immediately, at a time when the settings weren't initialized properly yet.
2018-09-28 20:12:11 +02:00
Aspen
ce2d33eb97 Fix stretched stars bug, change render order 2018-09-27 23:21:55 +02:00
Paramat
8543df7752
Fix various code issues found by cppcheck (#7741)
Mapgen Singlenode: Remove 'flags' that duplicates a 'class Mapgen' member.
Dungeongen: Initialise 'MMVManip *vm' to 'nullptr'.
Inventorymanager: Remove assignment error 'found = '.
2018-09-23 20:12:39 +01:00
SmallJoker
785f68ef33
Make OpenGL preference configurable, default to LEGACY (#7666)
This partially reverts 1ec5028
Add option OPENGL_GL_PREFERENCE
2018-09-22 20:54:43 +02:00
Vitaliy
79e393cf4b Light curve: Simplify and improve code, fix darkened daytime sky (#7693) 2018-09-16 17:59:42 +01:00
SmallJoker
220ec79e4a
Inv deSerialize(): Prevent infinite loop, error on failure (#7711)
Throws an error about potentially damaged player inventories but proceeds converting the rest of them
2018-09-14 20:29:21 +02:00
SmallJoker
81c06dea9b markAliasDeprecated: Fix MSVC build 2018-09-11 19:32:10 +02:00
Paramat
766fb7b46e
Particles: Make collision with objects optional (#7682)
Also set it to false for node dig particles, as they are often created
and high in number.

Improve particle documentation.
2018-09-08 00:38:35 +01:00
Paramat
7e21cec55b
Damage flash/hurt tilt: Make shorter to reduce player blindness (#7399)
Damage flash is shortened from 0.98-1.27s to 0.25s-0.33s to reduce
player in-game blindness, especially useful for combat situations.
It is also visually more comfortable.
Camera hurt tilt is made slightly shorter to match in duration.

Both flash and camera tilt are now of similar length to a typical
damage sound, such as the one used by Minetest Game which is 0.27s.
The 3 effects become more synchronised and unified.
2018-08-29 22:00:49 +01:00
Paramat
dcd1a15545
Play damage sound on player death (#7679)
Also run CSM 'on_damage_taken' callback.
Improve function logic and remove 'return'.
2018-08-28 23:23:04 +01:00
Paramat
8516f28458
Change mapgen order to ores > dungeons > decorations (#7656)
Previously dungeons > decorations > ores.
Decorations depend on the node they are placed on, and ore types are
increasingly able to place large continuous volumes of nodes, such as
strata. Decorations are increasingly being used underground.

The new order avoids a node being changed by ore generation after a
decoration has been placed on it.
The new order also avoids ores appearing in the walls of a dungeon if
the wall nodes match the local stone node.
2018-08-20 18:24:53 +01:00
rubenwardy
5a26e46aaa
Formspecs: Fix invalid background warning
Clipped backgrounds are still valid with no size[] tag, as they will apply themselves correctly to any size

Fixes #7197
2018-08-20 13:56:16 +01:00
ShadowNinja
1ec5028e5a Set OpenGL preference to GLVND
This silences a CMake warning introduced in CMAKE 3.11.
2018-08-18 14:23:41 -04:00
Vitaliy
78bd902b9f Really delete things in fs::RecursiveDelete (#7433)
* Really delete things in fs::RecursiveDelete
2018-08-18 11:00:06 +02:00
Paramat
4dff0021b8 Mgv5: Change tunnel parameters to those of other mapgens (#7641)
Make tunnels wider and use the noise parameters of most other mapgens.
All other underground features are already identical to all other
non-mgv6 mapgens, this final change modernises and improves the tunnels.
2018-08-16 20:10:56 +02:00
SmallJoker
297beea5bf
Check node updates whether the blocks are known (#7568)
* Remove unused ignore_id
2018-08-16 20:10:34 +02:00
Dániel Juhász
325bf68041 Raycast: export exact pointing location (#6304)
* Return intersection point in node coordinates.
* Clarify 'intersection_point' documentation
2018-08-16 20:10:08 +02:00
rubenwardy
28a3c4963e
Formspecs: Fix missing trim() when checking for no_prepend[] 2018-08-15 20:06:09 +01:00
pauloue
5aa865e56b Save debug.txt to build dir for RUN_IN_PLACE build (#7615) 2018-08-15 11:36:40 +02:00
lhofhansl
3a95d760e9 Some minor Fastface optimizations. (#7628) 2018-08-08 15:53:06 +02:00
rubenwardy
8d68b2cd21
Fix debug and info text being the wrong color
Fixes #7623
2018-08-05 23:16:05 +01:00
SmallJoker
ee63b94f2c Prevent objects from colliding with own child attachments (#7610)
Also, use a better distance calculation for 'collide with objects'.
Fixes the issue of a vehicle occasionally colliding with its own driver,
causing one of the velocity components to be set to zero.
2018-08-05 21:28:41 +01:00
rubenwardy
88efebdf86
Formspecs: Add tooltip element for area 2018-08-05 15:50:02 +01:00
Ben Deutsch
153fb211ac Replace auth.txt with SQLite auth database (#7279)
* Replace auth.txt with SQLite auth database
2018-08-05 13:13:38 +02:00
rubenwardy
1836882495
Fix tooltip colors specified by formspec part 2018-08-04 19:01:07 +01:00
stujones11
c5a137c29c Fix sky objects not rendering with ogles (#7598) 2018-08-04 18:46:39 +01:00
SmallJoker
3b9d49b3c7
guiFormspecMenu: Allow fraction values for container[] (#7497)
Switch spacing and pos_offset to v2f32 for percision, add helper function
2018-08-04 18:55:54 +02:00
SmallJoker
f3997025fd Smoothed yaw rotation for objects (#6825) 2018-08-02 23:25:37 +01:00
HybridDog
741e3efaf5 LuaVoxelManip: Throw warning or error instead of silently doing nothing (#7567)
Error on missing parameter.
Warning when using a method on the incorrect type of LuaVoxelManip.
2018-08-02 19:54:44 +01:00
rubenwardy
14011bdc7a
Add protocol_version and supported package types to ContentDB urls 2018-07-29 00:26:03 +01:00
Rob Blanckaert
2b83af783b Allow enter to select items from combobox's list (#7351) 2018-07-28 12:58:16 +02:00
ClobberXD
e8aad2ee00 Log server shutdown using actionstream (#7589) 2018-07-28 12:58:02 +02:00
zeuner
d7d451c647 Fix build on gcc 5.0 (#7586) 2018-07-26 21:49:38 +02:00
SmallJoker
4b217411ea Settings: Fix indents, chat_message_*. Update translations (#7580) 2018-07-25 17:07:11 +01:00
lhofhansl
7454deb1bf
Allow an optional readonly base database (#7544)
* Allow an optional readonly base database

* Added basic documentation
2018-07-25 17:54:23 +02:00
nOOb3167
9537cfd3f8 Add a MSVC / Windows compatible snprintf function (#7353)
Use sizeof where applicable for mt_snprintf
2018-07-22 21:56:06 +02:00
lhofhansl
f41df4315f Update Android defaults for modern H/W. (#7572) 2018-07-22 11:16:32 +02:00
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 99143f494711034068685b6ee845ce19fa09d7d9 and commit
f4ca830abe1aa22875c99b31bf2ee56e26f83f05.

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