Commit Graph

6790 Commits

Author SHA1 Message Date
sfan5
b56a028d6b Fix curl_timeout being ignored for Lua HTTP fetches 2021-05-17 17:12:30 +02:00
Dmitry Marakasov
53dca4f95f
Use --image-base instead of -Ttext-segment for lld linker on FreeBSD (#9367) (#11263) 2021-05-15 10:15:03 +02:00
sfan5
2443f1e235 Fix overlays for 2D-drawn items
fixes #11248
2021-05-08 19:44:43 +02:00
lhofhansl
7c2826cbc0
Fix build for newer versions of GCC (#11246) 2021-05-06 19:24:30 +02:00
Loic Blot
225d4541ff fix: extractZipFile is not part of Client but more generic.
This solve a crash from mainmenu while extracting the zip
2021-05-06 16:01:52 +02:00
sfan5
08f1a7fbed Use Irrlicht functions to query npot texture support 2021-05-05 22:49:44 +02:00
Loic Blot
de85bc9227 fix: some code tidy about includes & irr namespaces 2021-05-03 19:49:19 +02:00
Loic Blot
48d5abd5be refacto: remove get_gui_env & draw_load_screen from RenderingEngine singleton 2021-05-03 19:49:19 +02:00
Loic Blot
a93712458b fix: don't use RenderingEngine singleton when it's possible 2021-05-03 19:49:19 +02:00
Loic Blot
5a02c376ea refacto: RenderingEngine::get_scene_manager() is now not callable from singleton
This permits to make evidence that we have some bad object passing on various code parts. I fixed majority of them to reduce the scope of passed objects

Unfortunately, for some edge cases i should have to expose ISceneManager from client, this should be fixed in the future when our POO will be cleaner client side (we have a mix of rendering and processing in majority of the client objects, it works but it's not clean)
2021-05-03 19:49:19 +02:00
Loic Blot
ccdd886e27 refacto: Hud: make driver, client, player, inventory, tsrc private & drop unused guienv
also fix c_content.h, on client it includes the src/client/hud.h instead of src/hud.h, which leads to wrong file dependency on the lua stack
2021-05-03 19:49:19 +02:00
Loic Blot
a47a00228b refacto: drop unused Hud::smgr 2021-05-03 19:49:19 +02:00
Loic Blot
809e68fdc0 refacto: don't use RenderingEngine singleton on CAO
* we don't need on CAO side more than SceneManager, and temporary. Pass only required SceneManager as a parameter to build CAO and add them to the current scene
* Use temporary the RenderingEngine singleton from ClientEnvironment, waitfor for better solution
* Make ClientActiveObject::addToScene virtual function mandatory to be defined by children to ensure we don't forget to properly define it
2021-05-03 19:49:19 +02:00
Loic Blot
1bc855646e refacto: protect some RenderingEngine::get_scene_manager
* protect it from Camera, Sky, ClientMap object calls
* rename Game::sky to Game::m_sky
2021-05-03 19:49:19 +02:00
Loic Blot
258101a910 refacto: RenderingEngine is now better hidden
* No more access to the singleton instance from everywhere (RenderingEngine::get_instance dropped)
* RenderingEngine::get_timer_time is now non static
* RenderingEngine::draw_menu_scene is now non static
* RenderingEngine::draw_scene is now non static
* RenderingEngine::{initialize,finalize} are now non static
* RenderingEngine::run is now non static
* RenderingEngine::getWindowSize now have a static helper. It was mandatory to hide the global get_instance access
2021-05-03 19:49:19 +02:00
Loic Blot
74125a74d3 refacto: hide mesh_cache inside the rendering engine
This permit cleaner access to meshCache and ensure we don't access to it from all the code
2021-05-03 19:49:19 +02:00
Loic Blot
e0716384d6 refacto: add RenderingEngine::cleanupMeshCache
This permits to prevent client to own the mesh cache cleanup logic. It's better in RenderingEngine
2021-05-03 19:49:19 +02:00
Loic Blot
e34d28af9f refacto: rendering engine singleton removal step 1 (filesystem)
Make the RenderingEngine filesystem member non accessible from everywhere

This permits also to determine that some lua code has directly a logic to extract zip file. Move this logic inside client, it's not the lua stack role to perform a such complex operation

Found also another irrlicht <1.8 compat code to remove
2021-05-03 19:49:19 +02:00
Loic Blot
bc1888ff21 fix: drop old irrlicht <1.8 compat on Client::loadMedia 2021-05-03 19:49:19 +02:00
Vincent Robinson
074e6a67de
Add minetest.colorspec_to_colorstring (#10425) 2021-04-23 21:37:24 +02:00
sfan5
3e2145d662 Fix two CMake build issues
* PostgreSQL fallback code missed the includes (closes #11219)
* build failed when Freetype enabled but not found
2021-04-21 20:26:43 +02:00
sfan5
a24899bf2d
Look for PostgreSQL library properly and fix CI 2021-04-20 19:50:34 +02:00
sfan5
1da73418cd
Enable cleanTransparent filter for mipmapping and improve its' algorithm (#11145) 2021-04-20 19:50:19 +02:00
Wuzzy
90a7bd6a0a
Put torch/signlike node on floor if no paramtype2 (#11074) 2021-04-20 19:50:03 +02:00
Seth Traverse
16e5b39e1d
Add a key to toggle map block bounds (#11172)
It's often useful to know where the map block boundaries are for doing server admin work and the like.
Adds three modes: single mapblock, range of 5, and disabled.
2021-04-20 19:23:31 +02:00
sfan5
0077982fb7
GLES fixes (#11205)
* Consistently set float precision for GLES

* Enable DPI scaling on Windows+GLES
2021-04-18 16:07:13 +02:00
sfan5
623f0a8613 Isolate library tables between sandbox and insecure env 2021-04-18 16:06:42 +02:00
sfan5
52c0384bd1 Fix ignored OpenGLES2 include path and cmake warning 2021-04-16 23:39:16 +02:00
SmallJoker
bbe120308f
Attachments: Avoid data loss caused by set_attach() in callbacks (#11181) 2021-04-13 20:02:18 +02:00
sfan5
4d0fef8ae8
Buildbot changes to allow out-of-tree builds (#11180)
* Do proper out-of-tree builds with buildbot
* Don't write to bin/ for cross builds
     * This allows safely building multiple builds from the same source dir, e.g. with the buildbot.
* Disable Gettext (by default) and Freetype (entirely) for server builds
2021-04-11 17:10:06 +02:00
Wuzzy
4b8209d9a4
Modifying fall damage via armor group (#11080)
Adds a new fall_damage_add_percent armor group which influences the fall damage in addition to the existing node group.
2021-04-11 17:09:37 +02:00
sfan5
0abc1e98ed
Fix server favorites not saving when client/serverlist/ doesn't exist already (#11152) 2021-04-09 22:36:10 +02:00
Wuzzy
e89e6c8380 Don't reseed stars when changing star count 2021-04-09 22:33:45 +02:00
yw05
85163b531f
Make edit boxes respond to string input (IME) (#11156)
Make edit boxes respond to string input events (introduced in minetest/irrlicht#23) that are usually triggered by entering text with an IME.
2021-04-05 15:56:29 +02:00
sfan5
19c283546c Don't apply connection timeout limit to locally hosted servers
fixes #11085
2021-04-05 15:21:43 +02:00
SmallJoker
c11208c4b5
Game: Scale damage flash to max HP
The flash intensity is calculated proportionally to the maximal HP.
2021-04-05 13:38:50 +02:00
sfan5
f0bad0e2ba
Reserve vectors before pushing and other code quality changes (#11161) 2021-04-05 13:38:31 +02:00
sfan5
024d47e0d3
CGUITTFont optimizations (#11136) 2021-04-02 00:20:16 +02:00
sfan5
34888a914e
Sort out cURL timeouts and increase default 2021-04-02 00:19:39 +02:00
sfan5
1e4913cd76
Irrlicht support code maintenance 2021-03-31 13:15:47 +02:00
sfan5
0d90ed6d92
Draw items as 2D images (instead of meshes) when possible 2021-03-30 21:50:39 +02:00
Lars Müller
88d1fcfe23
Block & report player self-interaction (#11137) 2021-03-30 21:49:50 +02:00
SmallJoker
f4118a4fde
Consistent title bar + render information in mainmenu (#10764) 2021-03-30 21:49:15 +02:00
Wuzzy
6c9be39db0
Fix wield image of plantlike_rooted (#11067) 2021-03-30 00:27:46 +02:00
Vitaliy
3b78a22371
Degrotate support for mesh nodes (#7840) 2021-03-30 00:25:11 +02:00
sfan5
8d89f5f0cc
Replace fallback font nonsense with automatic per-glyph fallback (#11084) 2021-03-29 19:55:24 +02:00
Loic Blot
298bb3d8f7 Drop irrUString from MT, it's owned by irrlicht now 2021-03-26 20:58:45 +01:00
Desour
437d011968 Fix attached-to-object sounds having a higher reference distance 2021-03-23 15:43:40 +01:00
sfan5
2da1eee394
Fix broken BiomeGen abstraction (#11107) 2021-03-23 15:43:26 +01:00
Jean-Patrick Guerrero
c9eba8440d
Fix segfault for model[] without animation speed 2021-03-21 23:23:30 +01:00
Vitaliy
44ed05ddf0
Restore minimal normal texture support (for minimap shading) 2021-03-21 23:22:22 +01:00
sfan5
531e7ef8eb Serialize tool capabilities JSON without whitespace
fixes #11087
2021-03-20 22:06:17 +01:00
SmallJoker
05719913ac
Schematic: Properly deal with before/after node resolving and document (#11011)
This fixes an out-of-bounds index access when the node resolver was already applied to the schematic (i.e. biome decoration).
Also improves the handling of the two cases: prior node resolving (m_nodenames), and after node resolving (manual lookup)
2021-03-20 13:02:15 +01:00
Elias Fleckenstein
492110a640
Check for duplicate login in TOSERVER_INIT handler (#11017)
i.e. checks for duplicate logins before sending all media data to the client.
2021-03-19 21:45:29 +01:00
Elias Åström
59a1b53d67
Scale mouse/joystick sensitivity depending on FOV (#11007) 2021-03-19 21:43:01 +01:00
sfan5
96d4df995c
Drop old text input workarounds (#11089)
* Drop unused intlGUIEditBox

* Drop unnecessary Linux text input workarounds
2021-03-19 18:44:32 +01:00
Jean-Patrick Guerrero
285ba74723
GUIScene: Clear depth buffer + replace deprecated clearZBuffer calls 2021-03-16 23:28:16 +01:00
Jean-Patrick Guerrero
66b5c08664 Fix deprecated calls with Irrlicht 1.9 2021-03-16 23:27:15 +01:00
Wuzzy
62e3593944 Tweak duration_to_string formatting 2021-03-16 18:37:46 +01:00
sfan5
051bc9e662 Enable Irrlicht debug logging with --trace 2021-03-12 20:56:02 +01:00
sfan5
1bc85a47cb Avoid unnecessary copies during media/mesh loading 2021-03-12 20:56:02 +01:00
sfan5
cff35cf0b3 Handle mesh load failure without crashing 2021-03-12 20:56:02 +01:00
sfan5
bb1c4badfb Clean up cmake DLL installation and other minor things 2021-03-12 20:55:51 +01:00
sfan5
91c9313c87 Switch Irrlicht dependency to our own fork
-> https://github.com/minetest/irrlicht
2021-03-09 21:53:17 +01:00
sfan5
3579dd2186 Restore Irrlicht 1.9 support 2021-03-09 21:53:17 +01:00
sfan5
bf8fb2672e
Use place_param2 client-side for item appearance & prediction (#11024) 2021-03-09 00:56:53 +01:00
SmallJoker
176f5866cb Protect dropping from far node inventories
Also changes if/if to switch/case
2021-03-07 17:18:02 +01:00
SmallJoker
fc864029b9 Protect per-player detached inventory actions 2021-03-07 17:18:02 +01:00
sfan5
593d5f4465 Clean up ClientEvent hudadd/hudchange internals 2021-03-06 23:02:10 +01:00
sfan5
1c7b69f9cf Fix function override warnings in mg_ore.h 2021-03-06 14:21:08 +01:00
Vitaliy
abb0c99a6c Pause animations while game is paused (#10658)
Pauses all mesh animations while game is paused.
2021-03-05 16:30:01 +01:00
Wuzzy
cafad6ac03 Translate builtin (#10693)
This PR is the second attempt to translate builtin.
Server-sent translation files can be added to `builtin/locale/`, whereas client-side translations depend on gettext.
2021-03-05 16:29:48 +01:00
sfan5
ac8ac19169
Protect mg_name and mg_flags from being set by Lua (#11010) 2021-03-04 20:38:28 +01:00
SmallJoker
3a2f55bc19 Settings: Push groups in to_table as well 2021-03-01 12:14:41 +01:00
hecks
225e69063f
Keep mapblocks in memory if they're in range (#10714)
Some other minor parts of clientmap.cpp have been cleaned up along the way
2021-02-26 21:23:46 +01:00
savilli
3edb1ddb81
Fix hud_change and hud_remove after hud_add (#10997) 2021-02-26 21:21:20 +01:00
Lars Müller
b5eda416ce
Slap u64 on everything time-y (#10984) 2021-02-24 12:05:17 +01:00
rubenwardy
9f6167fc3b
Deprecate not providing mod.conf 2021-02-24 11:47:50 +01:00
Wuzzy
827224635b
Use "Aux1" key name consistently everywhere 2021-02-24 11:45:30 +01:00
sfan5
9b59b2f75d Fix keyWasDown in input handler
This was changed 291a6b70d674d9003f522b5875a60f7e2753e32b but should have never been done.
2021-02-23 19:41:38 +01:00
DS
4abe4b87b5
Allow overwriting media files of dependencies (#10752) 2021-02-23 19:39:15 +01:00
savilli
29681085b9
Fix wrong number of items in allow_metadata_inventory_put/take callbacks (#10990) 2021-02-23 19:36:55 +01:00
updatepo.sh
e86fbf9c06 Update minetest.conf.example and dummy translation file 2021-02-23 19:03:34 +01:00
SmallJoker
bce875fada Minimap: Fix default label translations 2021-02-22 20:25:16 +01:00
Lars Müller
051e4c2b00
Fix wrong reported item counts for inventory actions using Shift-Move (#10930) 2021-02-21 20:02:23 +01:00
Wuzzy
e441ab9675
Fix world-aligned node rendering at bottom (#10742) 2021-02-19 19:45:36 +01:00
rubenwardy
f85e9ab925
Add nametag background setting and object property (#10937) 2021-02-17 19:51:28 +00:00
rubenwardy
a8f6befd39
Fix short_description fallback order (#10943) 2021-02-17 18:53:44 +00:00
SmallJoker
7832b6843e
Server-side authority for attached players (#10952)
The server must have authority about attachments. This commit ignores any player movement packets as long they're attached.
2021-02-15 20:41:19 +01:00
sfan5
f018737b06 Fix segfault with invalid texture strings and minimap enabled
closes #10949
2021-02-14 11:28:02 +01:00
SmallJoker
375bcd65c1
Send attachments instantly before set_pos (#10235) 2021-02-12 20:54:06 +01:00
Jean-Patrick Guerrero
1d64e6537c Pause menu: Fix segfault on u/down key input 2021-02-08 18:56:51 +01:00
Jean-Patrick Guerrero
6591597430 Fix animation_image support in scroll containers 2021-02-08 00:04:38 +00:00
rubenwardy
857dbcd572 Reduce empty translation error to infostream
Fixes #10905
2021-02-07 16:03:48 +00:00
rubenwardy
3a8c37181a
Use consistent temp folder path (#10892) 2021-02-07 15:27:24 +00:00
Vitaliy
4caf156be5
Rewrite touch event conversion (#10636) 2021-02-07 11:48:30 +01:00
Muhammad Rifqi Priyo Susanto
3ac07ad34d
Fall back to default when rendering mode (3d_mode) is set invalid (#10922) 2021-02-06 13:47:12 +01:00
rubenwardy
fbb9ef3818
Reduce ore noise_parms error to deprecation warning (#10921)
Fixes #10914
2021-02-06 13:46:45 +01:00
sfan5
0f74c7a977 Fix double free caused by CGUITTFont code
This partially reverts commit 2072afb72b4b3e9c5dcbcec71d824aeae1b35d19.
fixes #10920
2021-02-06 13:34:56 +01:00
SmallJoker
d287da184c Server: properly delete ServerMap on interrupted startups
A static mod error (e.g. typo) would abort the initialization but never free ServerMap
2021-02-05 18:38:34 +01:00
k.h.lai
2072afb72b
Fix memory leak detected by address sanitizer (#10896) 2021-02-02 20:56:24 +01:00
Vincent Robinson
f227e40180
Fix list spacing and size (again) (#10869) 2021-02-02 20:55:13 +01:00
sfan5
674d67f312 Encode high codepoints as surrogates to safely transport wchar_t over network
fixes #7643
2021-02-02 20:46:08 +01:00
sfan5
c834d2ab25 Drop wide/narrow conversion functions
The only valid usecase for these is interfacing with OS APIs
that want a locale/OS-specific multibyte encoding.
But they weren't used for that anywhere, instead UTF-8 is pretty
much assumed when it comes to that.
Since these are only a potential source of bugs and do not fulfil
their purpose at all, drop them entirely.
2021-02-02 20:46:08 +01:00
sfan5
5e392cf34f Refactor utf8_to_wide/wide_to_utf8 functions 2021-02-02 20:46:08 +01:00
SmallJoker
7ebd5da9cd Server GotBlocks(): Lock clients to avoid multithreading issues 2021-02-02 19:10:35 +01:00
sfan5
40ad976753 Revise dynamic_add_media API to better accomodate future changes 2021-02-01 23:00:13 +01:00
sfan5
a01a02f7a1 Preserve immortal group for players when damage is disabled 2021-01-31 20:38:12 +01:00
sfan5
fd1c1a755e Readd Client::sendPlayerPos optimization (was part of 81c7f0a)
This reverts commit b49dfa92ce3ef37b1b73698906c64191fb47e226.
2021-01-31 20:38:12 +01:00
sfan5
112a6adb10
Cache client IP in RemoteClient so it can always be retrieved (#10887)
specifically: after the peer has already disappeared
2021-01-31 20:36:47 +01:00
rubenwardy
6e0e0324a4
Fix minetest.dig_node returning true when node isn't diggable (#10890) 2021-01-31 18:49:51 +00:00
updatepo.sh
cb807b26e2 Update minetest.conf.example and dummy translation file 2021-01-30 21:12:46 +01:00
SmallJoker
9a177f009b PlayerDatabaseFiles: Fix segfault while saving a player
Corrects a typo introduced in 5e9dd166
2021-01-29 18:02:40 +01:00
sfan5
9c91cbf50c
Handle changes caused by CMake minimum version bump (#10859)
fixes #10806
2021-01-29 17:35:29 +01:00
sfan5
83229921e5 Rework use_texture_alpha to provide three opaque/clip/blend modes
The change that turns nodeboxes and meshes opaque when possible is kept,
as is the compatibility code that warns modders to adjust their nodedefs.
2021-01-29 17:34:41 +01:00
sfan5
edd8c3c664 Drop never documented 'alpha' property from nodedef
Includes minimal support code for practical reasons.
We'll need it for a slightly different purpose next commit.
2021-01-29 17:34:41 +01:00
SmallJoker
2760371d8e Settings: Purge getDefault, clean FontEngine 2021-01-29 17:32:35 +01:00
SmallJoker
37a05ec8d6 Settings: Proper priority hierarchy
Remove old defaults system
Introduce priority-based fallback list
Use new functions for map_meta special functions
Change groups to use end tags

Unittest changes:
 * Adapt unittest to the new code
 * Compare Settings objects
2021-01-29 17:32:35 +01:00
SmallJoker
5e9dd1667b RemotePlayer: Remove Settings writer to Files database 2021-01-29 17:32:35 +01:00
rubenwardy
b5956bde25 Sanitize ItemStack meta text 2021-01-28 21:33:10 +00:00
Vitaliy
ed0882fd58
Include irrlichttypes.h first to work around Irrlicht#433 (#10872)
Fixes the PcgRandom::PcgRandom linker issue, caused by inconsistent data type definition.
2021-01-28 21:25:13 +01:00
Zughy
44a9510c81
Consistently use "health points" (#10868) 2021-01-27 18:42:02 +00:00
Vitaliy
8dae7b47fc
Improve irr_ptr (#10808) 2021-01-24 14:40:34 +00:00
Vincent Robinson
ad9adcb884
Fix formspec list spacing (#10861) 2021-01-23 14:49:13 -08:00
Vincent Robinson
6a55c03dab
Make hypertext and textarea have proper scroll event propagation. (#10860) 2021-01-23 14:48:57 -08:00
Vincent Robinson
009e39e73b
FormSpec: Add list spacing, slot size, and noclip (#10083)
* Add list spacing, slot size, and noclip

* Simplify StyleSpec

* Add test cases

Co-authored-by: rubenwardy <rw@rubenwardy.com>
2021-01-23 12:46:19 -08:00
rubenwardy
4c76239818
Remove dead code (#10845) 2021-01-22 15:09:26 +00:00
rubenwardy
67aa75d444
Use JSON for favorites, move server list code to Lua (#10085)
Co-authored-by: sfan5 <sfan5@live.de>
2021-01-22 15:08:57 +00:00
rubenwardy
4fcd000e20
MgOre: Fix invalid field polymorphism (#10846) 2021-01-21 19:08:06 +00:00
Zughy
45ccfe26fb
Removed some obsolete code (#10562)
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
2021-01-21 18:17:09 +00:00
Zughy
ea5d6312c1
ObjectRef: fix some v3f checks (#10602) 2021-01-21 18:37:38 +01:00
sfan5
d92da47697 Improve --version output to include Lua(JIT) version 2021-01-21 00:52:31 +01:00
Wuzzy
7f25823bd4
Allow "liquid" and "flowingliquid" drawtypes even if liquidtype=none (#10737) 2021-01-21 00:51:24 +01:00
Loïc Blot
4b01282821
Factorize more guiEditBoxes code (#10789)
* Factorize more guiEditBoxes code
2021-01-13 09:05:09 +01:00
JDiaz
08ee9794fb
Implement on_rightclickplayer callback (#10775)
Co-authored-by: rubenwardy <rw@rubenwardy.com>
2021-01-11 18:03:31 +01:00
Loïc Blot
5fcc78a1fe
Refactor/gui editbox (#10787) 2021-01-07 13:21:12 +01:00
Loïc Blot
58a709096e
refacto: factorize multiple code parts from guiEditbox childs (#10782) 2021-01-04 20:19:20 +01:00
rubenwardy
edd0836011
ContentDB: Add overwrite dialog when content is already installed (#10768) 2021-01-04 15:18:31 +00:00
hecks
dd5a732fa9
Add on_deactivate callback for luaentities (#10723) 2021-01-02 15:14:29 +01:00
Jean-Patrick Guerrero
ff921f6989 Formspecs: Fix broken texture escaping with model[] 2021-01-01 17:03:34 +01:00
Elias Fleckenstein
9250b5205a
Add minetest.get_objects_in_area (#10668) 2020-12-29 16:50:09 +01:00
Lars Mueller
09d7fbd645 Fix item tooltip background color not working 2020-12-28 13:57:45 +01:00
Lars Mueller
8f72d4b294 Fix minetest.is_nan 2020-12-24 22:07:04 +01:00
sfan5
74762470b2 Fix some minor code issues all over the place 2020-12-24 13:44:54 +01:00
Lars
289425f6bd Minor profiler fixes. 2020-12-23 14:48:08 -08:00
rubenwardy
2c3593b51e Fix unsafe cast in l_object 2020-12-23 22:24:58 +00:00
Markus
af22dd86e3
Fix some more joystick issues (#10624) 2020-12-19 22:01:05 +01:00
Vitaliy
ccbf8029ea
Cleanup shader generation code (#10663)
Shader generation is a mess. This commit cleans some parts up, including dropping remains of HLSL support which was never actually implemented.
2020-12-19 20:57:10 +01:00
rubenwardy
664f5ce960
Add open user data button to main menu (#10579) 2020-12-19 13:27:15 +00:00
DS
6f8a1c99d5
Documentation for highest formspec_version[] and changelog (#10592) 2020-12-18 19:38:07 +01:00
Lars
e638056523 Allow configuring block disk and net compression. Change default disk level. 2020-12-15 10:15:25 -08:00
Thomas--S
d0a38f694d
Formspec: Allow to specify frame loop for model[] (#10679)
Add the ability to specify an animation frame loop range for the model[] formspec element.
2020-12-15 19:06:36 +01:00
Zughy
4d41ed0975
Semi-transparent background for nametags (#10152) 2020-12-14 23:49:30 +01:00
SmallJoker
f2c8c6bf51 Revert "GUIFormSpecMenu: Shift+Click listring workaround for MacOS"
The commit caused Shift-Clicking issues on Linux due to another Irrlicht bug where
KeyInput.Shift released keys do not trigger OnEvent()

MacOS users should build using a recent Irrlicht 1.8 development version.
See also: https://sourceforge.net/p/irrlicht/patches/321/
2020-12-14 11:05:24 -08:00
SmallJoker
e18b6c5a21 GUIFormSpecMenu: Shift+Click listring workaround for MacOS
event.MouseInput.Shift is not implemented for MacOS
2020-12-12 20:55:06 +01:00
hecks
6d7067fd37
Implement mapblock camera offset correctly (#10702)
Implement mapblock camera offset correctly - reduce client jitter

Co-authored-by: hecktest <>
2020-12-05 15:03:40 -08:00
sfan5
07e0b527cf Revert "Increase limit for simultaneous blocks sent per client and the meshgen cache."
This reverts commit 2f6393f49d5ebf21abfaa7bff876b8c0cf4ca191.
2020-12-04 19:06:16 -08:00
SmallJoker
3176daee79 Input: Fix on_rightclick called when placing into air 2020-11-29 19:20:45 +01:00
Lars
f1d72d212a Avoid generating the same chunk more than once with multiple emerge threads. 2020-11-26 20:31:20 -08:00
sfan5
9bb381ebd3 Change typedef to normal definitions in GUI code 2020-11-26 22:42:19 +01:00
sfan5
868749b4f8 Return star color calculation to what it previously was 2020-11-26 22:17:11 +01:00
numzero
8689e00fca Fix style 2020-11-26 12:49:10 -08:00
numzero
c158e20e5b Provide fallback star color for GLES 2 with MT shaders disabled 2020-11-26 12:49:10 -08:00
numzero
cdcf7dca7c Sky: support GLES2
IrrLicht built-in shader is broken, have to write my own
2020-11-26 12:49:10 -08:00
numzero
be59668f47 Allow missing shaders 2020-11-26 12:49:10 -08:00
numzero
d7cf40a0ce Replace TriangleFan as poorly supported 2020-11-26 12:49:10 -08:00
numzero
560627eef8 Reuse seed when updating stars
The only currently relevant parameter is scale which can now be changed
without resetting stars position
2020-11-26 12:49:10 -08:00
numzero
3077afc0a2 Store stars in a single static mesh buffer 2020-11-26 12:49:10 -08:00
numzero
89cc5bf537 Don't evaluate things many times 2020-11-26 12:49:10 -08:00
numzero
095f82692d Batch cloud drawing 2020-11-26 12:49:10 -08:00
Lars
f1349be542 Avoid marking map blocks dirty upon deserialization. 2020-11-26 11:41:55 -08:00
Lars
8dc70ebb93 Fix camera panning glitches (partially revert 10489.) 2020-11-25 14:22:36 -08:00
Pierre-Yves Rollo
78273027bf Add sound to press event of some formspecs elements (#10402) 2020-11-23 21:28:25 +01:00
Paramat
872dce5020
Move Mapgen V7 river generation into the main generation loop (#10639)
All terrain generation now occurs in one loop, instead of rivers being
carved afterwards in a separate loop.
Fixes the removal of nodes added by mods in 'register on generated'.
Avoids other problems and reduces the chance of future bugs.
Mapchunk generation time is reduced.

Also fixes a code mistake which resulted in river channel generation
being disabled at floatland altitudes even when floatlands were disabled.
2020-11-20 16:11:19 +00:00
Lars
2f6393f49d Increase limit for simultaneous blocks sent per client and the meshgen cache. 2020-11-16 10:30:52 -08:00
sfan5
ad58ece180 serverpackethandler: Minor log message fixes
closes #10434
2020-11-12 21:08:26 +01:00
sfan5
b504a1aa4b Fix player sprite visibility in first person
closes #10525
2020-11-12 21:08:26 +01:00
sfan5
c441baa91b Fix overloaded virtual warnings with get/setAttachment() 2020-11-12 21:08:26 +01:00
red-001
8eb2cbac61
Fix warnings about an unused variables and implicit conversion (#10586) 2020-11-12 21:05:47 +01:00
SmallJoker
68139a28eb
Revert "Replace MyEventReceiver KeyList with std::unordered_set" (#10622)
This reverts commit 787561b29afdbc78769f68c2f5c4f2cff1b32340.
2020-11-12 19:16:02 +01:00
SmallJoker
adffef2b94
PlayerSAO: Run on_player_hpchange raw change values (#10478)
The callback is only run when a change in HP is to be expected.
Following cases will not trigger the callback:
 * Dead player damaged further
 * Healing full-health player
 * Change of 0 HP
2020-11-12 19:15:41 +01:00
Lars
be8d1d2d99 Increase default emerge queue limits and limit enqueue requests for active blocks. 2020-11-12 09:04:10 -08:00
SmallJoker
fca4db4184
ObjectRef: Re-add legacy code for set_physics_override (#10585)
These arguments are used at least by MTG beds and homedecor_common. A deprecation warning is shown to safely remove it in a future release.
2020-11-10 21:02:53 +01:00
sfan5
97aefe9b81 Mark additional locales as broken 2020-11-10 10:30:42 +01:00
sfan5
b6e47a30bb Update fallback font to newer version 2020-11-10 10:30:42 +01:00
Markus Koch
e1142ee57f Joystick: Remap joystick-specific KeyTypes to generic ones
According to the following table:
	* MOUSE_L     -> DIG
	* MOUSE_R     -> PLACE
	* SCROLL_UP   -> HOTBAR_NEXT
	* SCROLL_DOWN -> HOTBAR_PREV

This commit entirely removes the special KeyTypes used for joysticks.

Support for the MOUSE KeyTypes had already been removed in the main
game code without adapting the joystick code, breaking joystick
input. This commit restores joystick functionality.
2020-11-09 11:58:50 +01:00
rubenwardy
7589cbe086
Fix object interaction distance not being checked (#10547) 2020-11-09 11:55:15 +01:00
SmallJoker
c940a57a38 ContentCAO: Fix segfault when minimap is disabled 2020-11-08 11:30:16 +01:00
Lars
8c1871fa2c Revert #10495 and simplify. 2020-11-07 08:51:10 -08:00
sfan5
627c22c36e Fix integer-string conversion for shaders
closes #10605
2020-11-05 19:34:40 +01:00
SmallJoker
3356da0151
Add model[] formspec element (#10320)
Formspec element to display models, written by @kilbith, rebased and tweaked.

Co-authored-by: Jean-Patrick Guerrero <jeanpatrick.guerrero@gmail.com>
Co-authored-by: sfan5 <sfan5@live.de>
2020-11-04 21:46:18 +01:00
Lars Müller
e3bd6704a0
Revert "Fix short 180 degree rotation when using set_bone_position (#10405)" (#10534)
This reverts commit 0f98b54aa4b2361575002d92b29fe222703ba557.
2020-11-04 21:43:32 +01:00
Zughy
72b93ec0d7
Fix ObjectRef errors due to lua_isnil() (#10564)
Treat 'none' values as 'nil'
2020-11-04 21:43:18 +01:00
Lars
39213bd00a Slight simplification and optimization of RemoteClient. 2020-11-03 16:23:47 -08:00
Lars
aa4d3cb148 Increase defaults for viewing_range, active_object_range and related settings #10597 2020-11-03 15:55:53 -08:00
red-001
0abb3e89fa
Block attempts to connect to the client (#10589)
A Minetest peer initiates a connection by sending a packet with an invalid peer_id, for whatever reason the code for doing this ran on both the client and the server meaning you could connect to a client if you knew what the address:port tuple it was listening on.
2020-11-02 22:21:03 +01:00
SmallJoker
9c9344ceb3 Fix incorrect deprecation hints
"good" and "bad" were swapped in the process, resulting in wrong deprecation messages
2020-11-01 12:52:14 +01:00
rubenwardy
89dd05fdf3
Fix segfault in deprecation logging due to tail call, log by default (#10174) 2020-10-31 18:19:23 +00:00
Lars Müller
2dff3dd03f
Player physics: Ensure larger dtime simulation steps (#10563) 2020-10-29 20:15:46 +01:00
Oblomov
a701d24a00
Show RTT in ms with 2 digits of precision (#10573)
If your ping is in seconds, you probably have other problems.
2020-10-29 20:09:59 +01:00
Lars
68cd93b865 Avoid resending near blocks unnecessarily. 2020-10-27 12:08:44 -07:00
luk3yx
61a196378f
Fix CSMs on arm64 (#10553) 2020-10-25 18:01:39 +01:00
Vitaliy
707c8c1e95
Shaders for Android (GLES 2) (#10506)
Shader support for OpenGL ES 2 devices (Android)

Co-authored-by: sfan5 <sfan5@live.de>
2020-10-25 18:01:03 +01:00
Zughy
33b2c5f5b1
Clean up l_object.cpp (#10512)
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
2020-10-22 16:18:01 +01:00
Maksim
5c0a57f606
Fix Media... 0% on loading screen (#9478) 2020-10-21 20:42:40 +01:00
sfan5
c7aa92aaed Fix show_on_minimap default value for local player
fixes #10526
2020-10-20 16:36:05 +02:00
sfan5
4f2303849e
Implement unloading of static_save=false objects according to existing docs (#10485) 2020-10-19 20:38:33 +02:00
sfan5
660115c1ab
Decouple entity minimap markers from nametags replacing with show_on_minimap property (#10443) 2020-10-19 20:38:15 +02:00
Lars
b826e39730 Minor clientmap improvements.
- Avoid calculating isBlockInSight for blocks without meshes.
- Add metric for how many blocks the client has currently loaded.
- Make some variables constant.
2020-10-19 09:31:09 -07:00
Lars
738f624218 Periodically release all mesh HW buffers to avoid an Irrlicht bottleneck. 2020-10-17 13:22:30 -07:00
Lars
ed22260822 Remove all bump mapping and parallax occlusion related code. 2020-10-17 13:09:16 -07:00
Lars
f43d1cfa81 Rely on max_simultaneous_block_sends_per_client to limit blocks sent to the client. 2020-10-13 19:39:43 -07:00
Zughy
7499ebe46a
Fix float argument check in minetest.set_timeofday() (#10483)
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
2020-10-13 20:28:53 +01:00
Zughy
2341a4aff1
Add ObjectRef:get_children() (#10480)
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
2020-10-13 20:27:52 +01:00
Lars
521a04222a Avoid drawing invisible blocks on the client. 2020-10-13 09:30:59 -07:00
JosiahWI
11f3deb9c4
Pass ContentFeatures as reference to read_content_features (#10464) 2020-10-13 16:36:01 +01:00
Zughy
272b72361a
Add missing type check to InvRef:set_lists() (#10476) 2020-10-11 13:36:13 +02:00
DS
f3ae45b2b2
Add a short_description to be used by mods (#8980) 2020-10-09 19:11:21 +01:00
DS
b2f3f66385
Fix box[]es not being clipped (#10473)
Fixes a regression of #8676.
2020-10-08 19:44:47 +02:00
Zughy
a37e96eefc
-Wmem-access only called when GCC > 7 (#10453) 2020-10-06 20:51:27 +02:00
HybridDog
2f4037752b
Add minetest.get_artificial_light and minetest.get_natural_light (#5680)
Add more detailed light detection functions, a function to get the artificial light (torches) and a function to get the sunlight as seen by the player (you can specify timeofday).

Co-authored-by: rubenwardy <rw@rubenwardy.com>
2020-10-06 20:49:46 +02:00
rubenwardy
e80fc22dd9
Prevent games from setting secure settings (#10460) 2020-10-06 12:10:37 +01:00
SmallJoker
f46509d5e2
Remove unused functions reported by cppcheck (#10463)
Run unused functions reported by cppcheck

This change removes a few (but not all) unused functions.
Some unused helper functions were not removed due to their complexity and potential of future use.
2020-10-05 09:07:33 +02:00
Pierre-Yves Rollo
81c66d6efb Minimap as HUD element with API control
Features:
 * Define Minimap available modes (surface/radar, scale) from Lua, using player:set_minimap_modes()
 * New HUD elements for displaying minimap with custom size and placing
 * New minimap mode for displaying a texture instead of the map
2020-10-04 15:24:34 +02:00
Jordan Snelling
3068853e8a
Add First Person Attachments (#10360)
Fixes some other third person camera specific attachments.
Implements a single new flag for entities to be forced visible in first person mode.
Old mods do not need to be updated to use the new flag and are fully backwards compatible.
2020-10-04 15:10:34 +02:00
Lars Müller
0f98b54aa4
Fix short 180 degree rotation when using set_bone_position (#10405) 2020-10-04 15:09:12 +02:00
rubenwardy
3250b37e32
Deprecate get_player_velocity and add_player_velocity (#10173) 2020-10-04 00:33:45 +01:00
random-geek
0750047919
Fix scroll bar overlapping text (again) (#9058) 2020-10-03 17:34:34 +01:00
HybridDog
9dc29a75b4
Reduce the FPS when the window is unfocused (#8837) 2020-10-03 17:33:51 +01:00
SmallJoker
947466ab28 (se)SerializeString: Include max length in the name
This commit clarifies the maximal length of the serialized strings.
It will avoid accidental use of serializeString() when a larger string can be expected.

Removes unused Wide String serialization functions
2020-10-01 09:52:59 +02:00
SmallJoker
ca5c2dbefa Clean up serialization
This reverts 1a5b4b3 and further functions in serialize.cpp that are unused

The intend for a sane NetworkPacket/stream replacement was good, but a wrapper
class around i/ostream might be more versatile than introducing a new
vector-based serialization class.
2020-10-01 09:52:59 +02:00
SmallJoker
79414aa3e5 Settings: Remove unused functions
Make Settings-internal functions private
2020-10-01 09:52:59 +02:00
k.h.lai
995d405261
Improve MSVC cmake and update vcpkg instruction (#10407)
Remove unnecessary compiler flag for clang-cl
Update vcpkg instruction in README.md
2020-09-29 19:39:53 +02:00
Elias Fleckenstein
65c15e137f
Patch fast/teleport vulnerability when attached to an entity (#10340) 2020-09-26 18:41:44 +02:00
Tyler Schwend
917e357bca
Log server announce on updates and deletes too (#10177) 2020-09-26 18:41:16 +02:00
luk3yx
09af0c5946
Remove null bytes from TOCLIENT_BLOCKDATA (#10433) 2020-09-26 15:31:54 +02:00
Buckaroo Banzai
c6e3050357
Correct erroneous reported max lag with prometheus (#10427)
Co-authored-by: BuckarooBanzay <BuckarooBanzay@users.noreply.github.com>
2020-09-25 18:52:42 +02:00
Paramat
9bff154cba
Fix horizontal/vertical merging bug of hardware-colored framed glass (#10417)
Previously, the param2-controlled horizontal/vertical merge feature
(which was undocumented and forgotten) was always active, causing
uses of param2 other than "glasslikeliquidlevel" to affect H/V
merging.

Only respect H/V merge bits when paramtype2 = "glasslikeliquidlevel".
H/V merge bits and liquid level bits are designed to be used
simultaneously.
2020-09-24 00:10:50 +01:00
Vincent Robinson
787561b29a
Replace MyEventReceiver KeyList with std::unordered_set (#10419) 2020-09-23 19:12:20 +02:00
SmallJoker
add68369a5 Settings: Fix unittest memory leak, change input types 2020-09-22 19:05:04 +02:00
Wuzzy
55e2dd911b
Fix chat/infotext overlap if many chat lines (#10399)
Moves the infotext depending on the value of the recent_chat_messages value + 2 additional lines to account for the 2 debug mode lines + 1 additional line as "buffer" for better readability if chat is full.
2020-09-22 18:38:33 +02:00
SmallJoker
e7f33ee2f1 Settings: Fix crash on exit due to group double-free 2020-09-21 19:29:02 +02:00
Lars
49117de476 Record player existence in dymmy database. 2020-09-20 19:16:14 -07:00
rubenwardy
9ec75d7765
Clean up server-side translations, remove global variable (#10075) 2020-09-16 14:51:11 +01:00
hecks
fcff9f2911
Remove "generate normal maps" feature (#10313)
Erase all traces of normal "generation" from fragment shaders
Remove the "feature" from the engine and default config
Remove any leftover documentation of it
2020-09-14 19:27:25 +02:00
Sebastien Marie
3fb1f45301
Remove Thread::kill() and related unittest (#10317)
Closes: #6065
2020-09-10 12:19:18 +02:00
David CARLIER
0683bea283
Add NetBSD cpu affinity support code (#10378) 2020-09-09 19:12:58 +02:00
David CARLIER
62913b872e
Darwin platform build fix (#10376)
the event header seemingly being generic with libevent thus renaming it.
openal and opengl are deprecated on newer mac os releases thus suppressing the build warnings.
2020-09-09 19:12:03 +02:00
SmallJoker
0d128ab344
Inventory: Protect Craft and Drop actions (#10353)
Change dangerous pointer to unique_ptr for automated deletion.
2020-09-07 21:19:38 +02:00
Lejo
6dcc9e6331
Prevent interacting with items out of the hotbar (#10359) 2020-09-04 20:50:33 +02:00
Wuzzy
b3ace8f197
Scale inventory image for scaled allfaces nodes (#10225)
The inventory image size of the inventory image of nodes with drawtype allfaces (and related) is scaled as well if visual_scale is set (previously, the inventory image size was always the same)
2020-09-04 20:49:50 +02:00
Lars Müller
050964bed6
Fix inventory swapping not calling all callbacks (#9923)
"Predicts" whether something will be swapped for allow callbacks, then calls callbacks a second time with swapped properties.

Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
2020-09-04 20:49:07 +02:00
Paramat
4ba5046308
Add 'ores' global mapgen flag (#10276) 2020-09-03 01:28:40 +01:00
sfan5
74e22b72e1
Change default ambient occlusion gamma to 1.8 (#10185) 2020-09-01 20:18:32 +02:00
HybridDog
f5df70764d
[2] Code cleanup in serverpackethandler (#9349)
* Code cleanup in serverpackethandler

* do not define p_under unless a node is pointed
* use switch-case and reduce indentation
2020-09-01 08:08:18 +02:00
EvidenceB
5c4b560b68
Add compass HUD element (#9312)
Co-authored-by: Jean-Patrick Guerrero <jeanpatrick.guerrero@gmail.com>
Co-authored-by: Pierre-Yves Rollo <dev@pyrollo.com>
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
2020-08-29 20:13:30 +02:00
Hugues Ross
9976f36b18
Make bgcolor tint button background images (#9818) 2020-08-29 16:41:19 +01:00
Lars Müller
3693b6871e
Prevent players accessing inventories of other players (#10341) 2020-08-29 16:41:03 +01:00
SmallJoker
d28f1b0170
Mapgen: Fix on-by-default flags broken since eca6ee9 (#10318) 2020-08-29 00:14:38 +02:00
karamel59
d052593c7a
Lua API: Register missing get_texture_mod function (#10338) 2020-08-27 21:47:38 +02:00
Maksim
788f297595
Android: drop simple MainMenu (#10227)
The default (PC-style) MainMenu works great on Android. Provides access to ContentDB and allows players to create many worlds in a few clicks.
Makes the interface consistent and eliminates player confusion.
2020-08-27 21:46:57 +02:00
David CARLIER
b262184acf
NetBSD build fix proposal. (#10308)
Fixing thread naming call and let the class setting RANDOM_MIN/RANDOM_MAX.
2020-08-25 20:50:41 +02:00
mntmn
44c98089cf
shaders: Fix transparency on GC7000L (#10036)
Workaround for the missing GL_ALPHA_TEST implementation in Mesa (etnaviv driver).
2020-08-25 20:49:51 +02:00
Desour
f27cf47779 Properly handle mod-errors in on_shutdown 2020-08-24 19:55:25 +03:00
Kezi
3e5bce2251
darken tabheader background color (#10299) 2020-08-23 22:50:45 +02:00
EvidenceB
287f3fb2e3
Avoid drawing clipped out formspec elements (#10095) 2020-08-23 22:50:14 +02:00
adrido
3c2890692b
Fix MSVC compiler warnings (#10197) 2020-08-23 15:41:04 +02:00
BenjaminRi
f5a203fbcd
Fix light overflow of u8 if light is saturated at 255 (#10305) 2020-08-23 15:39:55 +02:00
David CARLIER
cf5547227d
Complete Haiku platform support. (#10311)
Fixing linkage/libraries missing issue.
Implements missing platform specifics.
2020-08-23 15:39:32 +02:00
DS
98faeac5a7
Load media from subfolders (#9065) 2020-08-20 22:25:29 +02:00
Sebastien Marie
9c7340104a
Define environ variable on OpenBSD (#10302) 2020-08-20 19:10:58 +02:00
Pierre-Yves Rollo
71287894ad
Fix missing translation call in hypertext (#10296) 2020-08-20 12:25:02 +02:00
v-rob
83d0c360cc
Add gradients and borders to FormSpec boxes (#8676) 2020-08-19 18:14:47 -07:00
v-rob
471497fa91
Optimize formspec form size (#10144) 2020-08-19 16:13:29 -07:00
hecks
5bda36143f
Clean up sound_fade (#10119)
Add proper documentation and correct gain reduction calculations.

Co-authored-by: hecktest <>
2020-08-19 19:26:37 +02:00
Lars
649211bf27 Allow the ABM time budget to be configurable. 2020-08-18 16:04:32 -07:00
rubenwardy
7242de1d4b
ContentDB: Add Update All and download queuing (#9995) 2020-08-17 19:09:33 +01:00
ANAND
291a6b70d6 Allow binding dig, place actions to keys; remove LMB/RMB hardcoding
Co-authored-by: Sam Caulfield <sam@samcaulfield.com>
2020-08-15 12:19:20 +03:00
sfan5
fff0393187
Render nodeboxes with opaque material if possible (#10122) 2020-08-12 11:52:50 +02:00
Lars Müller
1c38027c3a
Fix precision not working in hud_change (#10186) 2020-08-12 11:51:50 +02:00
v-rob
cd0e213a36
Add font styling options to tables and textlists (#10203) 2020-08-11 20:07:17 +02:00
Paramat
f92a393f6f
Mapgen Flat: Add caverns, disabled by default (#9913)
Add the caverns used in V5, V7, Valleys, Carpathian.
Disabled by default to not be force-enabled in existing worlds.
2020-08-05 05:00:00 +01:00
Hugues Ross
93ecc589bc
Implement override.txt support for special tiles (#10140)
Add override targets for all special_tiles entries in node definitions, allowing texture packs to replace these textures. This makes overrides work properly with a variety of drawtypes.

The targets are named special1 through special6, covering the the current length of the special_tiles array.
2020-08-04 20:12:47 +02:00
Seeker
d22fd6fc34
Fix build for Visual Studio (explicitly cast pointers) (#10256) 2020-08-03 23:38:45 +02:00
Paul Ouellette
542df11bed
Fix GCC class-memaccess warnings (#10239) 2020-08-01 17:25:33 +02:00
sfan5
9bba52c400
content_cao: Support texture animation for upright_sprite (#10020) 2020-07-30 17:39:57 +02:00
SmallJoker
e5725dfb8e
Allow starting local server using --go again (#10229) 2020-07-29 23:20:01 +02:00
Lars Müller
470f328216
Revert "Get rid of non-ascii characters in the debug display code (#8821)" (#9828)
This reverts commit 4f9ccd89b347dad3db5ce63d3405a8d60c163af5.
2020-07-29 23:17:52 +02:00
Lejo
715a123a33
Add PUT and DELETE request + specific method value to HTTP API (#9909) 2020-07-29 23:16:21 +02:00
SmallJoker
f34abaedd2 decode_base64: Allow '=' padding character
'=' is a valid character, but minetest.decode_base64 returned nil when it was used for padding.
2020-07-29 20:46:42 +02:00
Hugues Ross
3ce03d1c2a
Sanitize world directory names on create. Keep original name separate (#9432)
Blacklisted characters are replaced by '_' in the path. The display name is stored in world.mt, and duplicate file names are resolved by adding an incrementing suffix (_1, _2, _3, etc).
2020-07-28 19:16:57 +02:00
Wuzzy
ae83edd165
Play place_failed sound if occupied or cannot attach (#9486) 2020-07-27 19:40:33 +02:00
Wuzzy
808fa5ecb3
Improve default inventory+wield images of node drawtypes (#9299) 2020-07-23 19:54:58 +02:00
sfan5
8ca602150d
Replace std::list<session_t> in networking code (#10215) 2020-07-23 19:47:58 +02:00
Maksim
76afde861d
Android: Fix ConfirmRegistration and PasswordChange input and scale size (#10182) 2020-07-21 13:16:25 +01:00
Lars Müller
82731d0d3d
Revert "Auto delete MetaData when = 0 (#8770)" (#10183)
This reverts commit 808eb4c5714da5ac36f4a70653d6b3805060828c.
2020-07-16 19:11:24 +02:00
Zughy
cfaef5b1cf
Formspecs: volume and key settings windows can now be closed by doubleclicking/tapping (#10128)
Co-authored-by: Xx_Crazyminer_xX <carlo.digioia@hotmail.it>
Co-authored-by: Marco <4279489-marco_a@users.noreply.gitlab.com>
2020-07-14 22:37:28 +02:00
sfan5
4b4513a67d
Implement grouped mode for find_nodes_in_area (#9888)
plus general improvements to find_node_* functions
2020-07-14 22:36:53 +02:00
LoneWolfHT
88ffd64124 Add object crosshair, disable entity selectionboxes by default (#9523)
Adds new object crosshair base pack texture
2020-07-14 19:13:04 +02:00
SmallJoker
4fa1e03f68
Cleanup ClientLauncher structure (#10160)
Remove duplicated variables and unify the startup data into a new (inherited) struct.
2020-07-14 19:10:37 +02:00
v-rob
2bec83eec0
Add FormSpec font styling options (#9763)
* Add FormSpec font styling options

* Change multiplication to stof

* Remove extraneous check
2020-07-12 09:48:50 +02:00
Lejo
1dd6c8ed7f
Add reconnect button on error: Too many players (#9405) 2020-07-12 09:47:52 +02:00
v-rob
e0499731a8
Allow FormSpec elements to be focused with set_focus (#9353)
This allows you to specify a FormSpec element to set the focus of with "set_focus[<name>;<always set>]".
2020-07-12 09:47:05 +02:00
Lars Müller
d80def5bbf
Bump animation frame count from u8 to u16 (#10054) 2020-07-10 12:12:19 +02:00
sfan5
c6422e0872
Remove std::shared_ptr use in TileLayer (#10090) 2020-07-10 12:11:44 +02:00
v-rob
b1ff04e06d
Formspec: Make dropdowns optionally return event based on index, not value (#9496) 2020-07-10 12:11:26 +02:00
sfan5
70df3d54f3 Quick workaround for crashing destructor on Mingw32
closes #10137
2020-07-09 22:01:46 +02:00
rubenwardy
42b0d612ef Fix build due to revert error 2020-07-07 19:31:14 +01:00
TheTermos
ebb721a476 Fix player controls only being applied for the first move 2020-07-07 19:09:23 +02:00
rubenwardy
6e4d8de104 Revert "Verify database connection on interval (#9665)"
Fixes #10113

This reverts commit 5c588f89e79e02cba392abe3d00688772321f88b.
2020-07-07 17:50:52 +01:00
Paramat
dc6318b84a
Apply camera smoothing to 'air stepheight' (#10025)
Recent changes to collision code have changed the behaviour of the 'touching_ground'
bool in movement code. This had the effect of disabling camera smoothing when
'air stepheight' occurred when jumping onto a node while pressing forwards against
the node, causing an unpleasant sharp camera movement.

Rewrite the conditions for camera smoothing such that it is applied when jumping.
2020-07-05 23:45:21 +01:00
v-rob
da71313e1d
Don't stop style parsing on unknown property (#10143) 2020-07-03 18:33:23 +02:00
hecktest
7be082f9a8
Fix bone-attached entities (#10015) 2020-06-26 00:06:29 +02:00
Pierre-Yves Rollo
ee6c499ff8
Fix wrong use of guiScalingImageButton in formspecs buttons (#10094) 2020-06-24 11:35:06 +02:00
rubenwardy
4cb18d4874
Fix HTTP API not being available in async mainmenu (#10086) 2020-06-22 14:40:04 +01:00
rubenwardy
0f1f8e4a0f
Add warning when disabling secure.enable_security (#9943) 2020-06-20 13:21:38 +01:00
Maksim
a2199bf622
Android: fix TMPFolder path (#10052) 2020-06-20 12:06:30 +02:00
SmallJoker
57df895cf9 ParticleSpawner: Fix crash when attaching to invisible entity 2020-06-19 19:29:47 +02:00
sfan5
495f7198ef content_cao: Fix behavior of legacy "textures" field for wielditems 2020-06-18 19:36:06 +02:00
rubenwardy
8ebeed53ad
Android: Fix only right strafe working (#10046) 2020-06-18 01:43:43 +01:00
Danila Shutov
3a6dfda358
Make shading of CAOs optional (#10033) 2020-06-16 20:48:31 +01:00
updatepo.sh
0ba19a08b8 Update minetest.conf.example, settings_translation_file.cpp 2020-06-13 23:22:32 +02:00
Lars Müller
e7e065f553
Exposing the zoom key to Lua API (#9903)
Co-authored-by: Raul Ferriz <raul.ferriz@gmail.com>
2020-06-13 22:46:20 +02:00
sfan5
2424dfe007
Server pushing media at runtime (#9961) 2020-06-13 19:03:26 +02:00
luk3yx
982a030f33
Add LevelDB player database (#9982) 2020-06-12 18:54:20 +02:00
sfan5
3f0cbbc372 Use multiple light positions for CAO lighting 2020-06-11 21:13:26 +02:00
sfan5
f89794108c content_cao: Do not expire visuals for texture updates 2020-06-11 21:12:36 +02:00
sfan5
80d9e9c183 Fix build error on Ubuntu 16.04 (again) 2020-06-10 11:46:14 +02:00
sfan5
64380cf92e Fix build error on Ubuntu 16.04 2020-06-10 10:58:13 +02:00
Danila Shutov
fe3e69eb40
Fix broken coloring of wielditems (#9969)
Fixes a regression that appeared in 5.3.0-dev.
2020-06-09 21:38:09 +02:00
Paul Ouellette
b16f841756
LuaItemStack: Add __tostring metamethod (#8785)
* LuaItemStack: Add __tostring metamethod

* Clean up LuaItemStack::checkobject
2020-06-09 19:37:25 +02:00
hecktest
09e285f38c
Fix player-to-object attachment teleport bug (#10008)
Fixes two bugs:

 * The camera offset was not applied to an object while detaching, briefly placing the irrlicht matrixnode in world space.
 *  When attaching, the matrixnode's absolute position was evaluated without evaluating the parent first, resulting in zeroed positions.
2020-06-09 19:36:47 +02:00
MoNTE48
b9f618746c TouchScreenGUI: fix some bugs, cleanup 2020-06-09 19:35:25 +02:00
MoNTE48
0d8e5bf587 TouchScreen Control: fix some bugs, cleanup 2020-06-09 19:35:25 +02:00
Maksim
756dc89ede Fix real keyboard movements on touchscreen devices 2020-06-09 19:35:25 +02:00
MoNTE48
3cee55f2b4 Hide tooltip after ETIE_LEFT_UP (for touch control) 2020-06-09 19:35:25 +02:00
sfan5
0ab580810c Reset touching_ground when in free_move
This corrects local player animation after enabling fly while standing on ground.
2020-06-07 20:45:26 +02:00
Paul Ouellette
09f9e465e7 Fix Lua panic when error() message is not a string 2020-06-07 18:14:40 +02:00
Danila Shutov
fe1f72ab0a
Recalculate mesh normals for CAOs (#10000) 2020-06-07 18:14:00 +02:00
SmallJoker
8fc9e7eb11 GenericCAO: Fix glow not working since a08d18a 2020-06-07 14:17:32 +02:00
Vitaliy
e746607d0f
Restore visual_scale support for nodeboxes (and allfaces) (#9906) 2020-06-06 22:25:18 +02:00
rubenwardy
60bab8b2d7
Add HTTP API to main menu (#9998) 2020-06-06 17:17:08 +01:00
Maksim
7ec0e3df35
Fix HUD scaling (#9721)
This resolves HUD scaling issues on Android and desktops with custom DPI settings.
2020-06-05 21:42:33 +02:00
ANAND
08c0b7696a
TestBan: Clean up properly after completing test (#9994) 2020-06-05 20:04:14 +02:00
SmallJoker
c1e01bc638
Move shared parameters sending to UnitSAO (#9968)
Better header sorting by topic
Make UnitSAO-specific parameters private
Skip redundant recursive entity sending code (since ~5.2.0)
2020-06-04 19:31:46 +02:00
sfan5
0e698e63b3 Fix autoscale_mode segfault if tile doesn't have texture
closes #9965
2020-06-01 21:19:35 +02:00
SmallJoker
42a9b45c21
Lua API: Log incorrect parameter types as error (#9954)
Incorrect parameter types are logged as errors, taking coercion into account.
This is a workaround to ensure mod compatibility.
Duplicate warnings are ignored per server instance.
2020-06-01 19:02:15 +02:00
SmallJoker
a08d18acad
ContentCAO: Update light of all attached entities (#9975) 2020-06-01 19:01:47 +02:00
Hugues Ross
f849917bbe
imageScaleNNAA: Fix image clipping on rect- instead of image dimensions (#9896)
Fixes GUI scaling filters applied on animated images and 9slice backgrounds.
2020-06-01 15:22:04 +02:00
sfan5
4c8e1c3200 Clean up CAO nametag handling and remove deprecated AO_CMD
AO_CMD_UPDATE_NAMETAG_ATTRIBUTES was deprecated in
9eee3c3f465c071bb9908749cf48be3c131a1bdf (0.4.14)
2020-05-29 22:54:50 +02:00
sfan5
db7c262ee8 content_cao: Do not expire visuals when not necessary
fixes #6572
2020-05-29 22:54:50 +02:00
MoNTE48
34862a6442 Add disable_jump check for the player's feet 2020-05-29 22:53:58 +02:00
sfan5
471e567657 Value copy / allocation optimizations mostly in server, SAO and serialize code 2020-05-27 21:58:40 +02:00
sfan5
58f523e363
Fix liquids refusing to flow in X+ or Z+ in some cases (#9874)
Applies when a different:
- falling liquid is neighboring
- liquid is below
2020-05-26 23:17:23 +01:00
Wuzzy
083b285f43
Rename “Minimal development test” to “Development Test” (#9928) 2020-05-26 00:17:52 +02:00
Paramat
b546e8938d
L-System trees: Remove hardcoded use of 'mapgen_dirt' alias (#9931)
Games often and increasingly do not use this mapgen alias, as it
is only required for Mapgen V6. Such games were triggering the
recently added error message.

Even if this mapgen alias was defined, dirt nodes placed under a
wide trunk were inconsistent with biomes that do not use dirt
surface nodes.

Place trunk nodes below a wide trunk instead of 'mapgen_dirt'.
On sloping ground, the trunk then extends down to the surface,
instead of the surface rising up to meet the trunk. This looks
more natural and does not alter the terrain.
2020-05-25 21:11:57 +01:00
SmallJoker
5311a27523 Silence GCC warning in mapblock_mesh
Fixes following warning:
  warning: ‘waving’ may be used uninitialized in this function [-Wmaybe-uninitialized]
2020-05-25 19:10:23 +02:00
rubenwardy
212a1123e0 Fix build on FreeBSD, broken since open_url 2020-05-24 15:31:06 +01:00
SmallJoker
a9b74f4c39
Add chat_font_size setting (#9736)
Default font sizes are used when the setting value is 0 or below (clamped by Settings).
2020-05-24 14:24:13 +02:00
sfan5
f51cf7c68a
Fix two bugs in content_cao
fixes #9889 (backface_culling with visual = "cube")
fixes #9916 (crash with visual = "upright_sprite")
2020-05-24 11:48:51 +02:00
sfan5
5430770b68 Fix constant re-queueing of emerges that will always be unsuccessful 2020-05-24 11:48:33 +02:00
sfan5
a9d6be8b6f Fix documentation of emergequeue_limit settings 2020-05-24 11:48:33 +02:00
sfan5
10c3002aea Optimize particlespawner sending by not sending to distant players 2020-05-23 22:52:21 +02:00
sfan5
9d6e7e48d6 Implement spawning particles with node texture appearance 2020-05-23 22:52:21 +02:00
sorcerykid
15ba75e4cf Add on_authplayer callback and 'last_login' to on_joinplayer (#9574)
Replace on_auth_fail callback with more versatile on_authplayer
    Better clarify account login process in Lua API documentation
    Change initial timestamp for newly registered accounts to -1
2020-05-23 13:25:29 +02:00
Awkor
037422fdba
Modernize include guards and add missing ones (#9898) 2020-05-23 13:23:05 +02:00
Lejo1
e79bc40c0a Check for valid base64 before decoding (#9904) 2020-05-22 14:26:22 +02:00
SmallJoker
7ab0c0662a MacOS: Fix environ not being found 2020-05-22 14:24:55 +02:00
sfan5
1357ea1da2
Cleanup of particle & particlespawner structures and code (#9893) 2020-05-22 13:23:25 +02:00
Vitaliy
82e4137893
Cache liquid alternative IDs (#8053) 2020-05-20 22:52:10 +01:00
Paramat
42fcfb75e8
Allow more than 255 biomes, document new maximum (#9855)
Change biomemap data type from u8 to u16.
New technical (not practical) maximum is 65535 biomes.
2020-05-20 22:16:14 +01:00
sfan5
c47a680db7 Stop wasting memory on identical textures when texture filtering is disabled 2020-05-20 22:55:51 +02:00
sfan5
732c8008f4 CSM: Fix crashing minetest.get_item_def()
fixes #9884
2020-05-20 20:15:09 +02:00
Wuzzy
c94d37827d
Rework functionality of leveled nodes (#9852)
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
2020-05-19 21:08:37 +02:00
LoneWolfHT
7d3972a504
Add ability to scale HUD text (#9814)
Add 'size' property to HUD text elements that is used for relative font size calculations.
2020-05-19 19:10:39 +02:00
sfan5
0fc51db772 Add missing sao->isGone() checks
fixes #9883
2020-05-18 23:23:25 +02:00
sfan5
52430d34d3 content_mapblock: Move static initialization out of functions 2020-05-17 21:37:01 +02:00
sfan5
be38a44ffe Client: Add sum and average to packetcounter 2020-05-17 21:37:01 +02:00
rubenwardy
a9c3a42323
Add core.open_url() to main menu API (#8592) 2020-05-17 19:09:10 +01:00
ANAND
c1ce4be756
Make automatic_rotate relative, allow setting rotation (#8468)
automatic_rotate does not make sense if it is absolute. Make it relative.

To avoid bouncing, set_rotation did not update the client when automatic_rotate was set. That's no longer necessary because the new spinning method applies the rotation on top of the current one, and the updates are necessary for set_rotation to actually transform the object.

Co-authored-by: ANAND <ClobberXD@gmail.com>

Co-authored-by: Pedro Gimeno <pgimeno@users.noreply.notabug.org>
2020-05-16 21:42:31 +02:00
sfan5
a08251a61e Log protocol ver on mismatched client connect too 2020-05-16 12:03:36 +02:00
Paramat
af0f7ac4a2
Add new Mapgen V7 floatland implementation (#9296)
Floatland structure is vertically-compressed 3D noise.
Uses a lacunarity of 1.618 (the golden ratio) for high quality
noise.
Floatlands appear between user-settable Y limits, with smooth
tapering at each limit.
Simple user-settable density adjustment.
Shadow propagation is disabled in and just below floatlands, no
shadows are cast on the world surface.
Can be reconfigured to create a solid upper world layer between
the Y limits, lakes/seas can be optionally added to this.
2020-05-14 22:27:54 +01:00
sfan5
d76785b4c7
network: Replace a fatal_error with just error logging 2020-05-14 21:18:26 +02:00
sfan5
36d35f2fe3
CSM: Bugfixes to camera:get_pos() and camera:get_fov()
closes #9857
2020-05-14 21:16:45 +02:00
TheTermos
6ef7ad09bb
Collision detection - #9343 follow-up (#9764)
* truncate speed to prevent inf result

* code styling

* change truncate() input parameters
2020-05-14 19:28:27 +02:00
SmallJoker
836dd4a1e4
Add chat_log_level setting (#9223)
Log all higher levels in LogOutputBuffer
Move StreamLogOutput::logRaw to source file like LogOutputBuffer::logRaw for compiling speed
2020-05-14 19:26:15 +02:00
Lars Müller
9ba24f89f5
Damage texture modifier (#9833)
Adds a new object property "damage_texture_modifier"
2020-05-11 21:41:36 +02:00
Wuzzy
6e1372bd89
Add support for statbar “off state” icons (#9462)
This adds support for optional “off state” icons for statbars. “off state icons” can be used to denote the lack of something, like missing hearts or bubbles.

Add "off state" textures to the builtin statbars.

Co-authored-by: SmallJoker <mk939@ymail.com>
2020-05-11 21:40:45 +02:00
TheTermos
7cb53791c3
Color gradient for default and 'regular' type sky (#9502)
* add regular sky gradient

* add regular sky gradient

* Update sky.cpp

* change default day sky colors
2020-05-09 17:14:56 +02:00
Paul Ouellette
b6242498aa
Always use same default tabheader height (#9319)
Previously the default tabheader height was different when using
real coordinates. This resulted in the height of tabs changing when
switching tabs in sfinv if some tabs used real coordinates.
2020-05-09 17:14:29 +02:00
Loïc Blot
454dbf83a9
Server class code cleanups (#9769)
* Server::overrideDayNightRatio doesn't require to return bool
There is no sense to sending null player, the caller should send a valid object

* Server::init: make private & cleanup
This function is always called before start() and loads some variables which can be loaded in constructor directly.
Make it private and call it directly in start

* Split Server inventory responsibility to a dedicated object

This splits permit to found various historical issues:
* duplicate lookups on player connection
* sending inventory to non related player when a player connects
* non friendly lookups on detached inventories ownership

This reduce the detached inventory complexity and also increased the
lookup performance in a quite interesting way for servers with thousands
of inventories.
2020-05-07 22:38:41 +02:00
sfan5
650168cada Fix Server triggering wrong errors if environment init fails 2020-05-07 22:02:22 +02:00
Jozef Behran
4f9ccd89b3
Get rid of non-ascii characters in the debug display code (#8821) 2020-05-06 21:35:18 +02:00
v-rob
664800b2ad
FormSpec: Add universal style selector * (#9718) 2020-05-06 19:36:02 +02:00
Maksim
4f9a5f67ee
Android: porting_android.cpp refactoring (#9687)
* Android: porting_android.cpp refactoring

* Replace assert to FATAL_ERROR_IF
2020-05-06 14:25:57 +02:00
sfan5
b6b80f55c8 Expose collided objects in moveresult
closes #9787
2020-05-06 14:03:52 +02:00
sfan5
cb159f8d8a Fix crash when exiting server during running mapgen
easily reproducible with a high num_emerge_threads and /emergeblocks
2020-05-05 20:19:47 +02:00
sfan5
f3e87c53a5 Fix thread safety of PcgRandom use in BiomeGen 2020-05-05 19:26:59 +02:00
sfan5
c28fbd06a8 Fix remaining issues with mapgen scriptapi 2020-05-05 19:26:59 +02:00
sfan5
3c65d1acec Give the Mapgen on each EmergeThread its own Biome/Ore/Deco/SchemManager copy 2020-05-05 19:26:59 +02:00
sfan5
2062c80e21 Allow ObjDefManager instances to be cloned 2020-05-05 19:26:59 +02:00
sfan5
d1c6cc72cc
Server: Improve some log messages (#9820) 2020-05-05 17:05:11 +02:00
Loïc Blot
f1a05d0f71
Fix broken client if openal cannot be opened (#9804) 2020-05-05 08:38:18 +02:00
SmallJoker
cad5b987ad Sky API: Rename *_tint to fog_*_tint for consistency 2020-05-05 08:37:04 +02:00
SmallJoker
1b6f40c356 Rename moveresult speed to velocity 2020-05-05 08:37:04 +02:00
Wuzzy
66c182531c
Change default keys for cam/minimap to C/V (#9779) 2020-05-04 08:45:31 +02:00
Hugues Ross
cb9a44ef89
Add 'content_offset' and 'padding' style properties for buttons (#9661)
* Add padding and content_offset style properties to buttons
2020-05-02 13:32:02 +02:00
Lejo
808eb4c571
Auto delete MetaData when = 0 (#8770)
* Auto delete MetaData when = 0
2020-05-02 12:57:04 +02:00
ANAND
e0ea87f1f3
set_fov: Add support for time-based transitions (#9705) 2020-05-02 12:52:11 +02:00
sfan5
ac368af4fe
Allow connection info to be missing from minetest.get_player_information() (#9739)
fixes #9352
This reverts commit 23c907befea02005e2c0c87fca0131b60aace18a.
2020-05-01 21:44:28 +02:00
Lejo
74d9b6010f
Give the online lua mainmenu also the client_list and mods (#8691) 2020-05-01 16:47:17 +02:00
Juozas
3f275d799c
Fix gettext detection and locale building (#9772)
broken since a368e7e
2020-04-29 12:49:55 +02:00
Loic Blot
56bababcdf Add MetricsBackend with prometheus counter support 2020-04-29 07:48:08 +02:00
ANAND
a36c9c3e93
Fix breath_bar scaling; delay breath_bar hiding by one second (#8271)
PLAYER_MAX_BREATH_DEFAULT was earlier set to 11, so that 10 bubbles are shown before the breath bar disappears.

Now, PLAYER_MAX_BREATH_DEFAULT is set to 10, and the breath_bar scaling code in builtin has been tweaked to show all 10 bubbles before hiding the breath_bar
2020-04-28 19:30:57 +02:00
sfan5
3475759d1a Expose collision information to LuaEntity on_step 2020-04-27 20:45:46 +02:00
k.h.lai
aef59f2ad9
Remove /LTCG from when compiling with clang-cl (#9765)
Remove /LTCG from CMAKE_EXE_LINKER_FLAGS_RELEASE when compiling with clang on Windows
2020-04-27 20:44:52 +02:00
sfan5
ca8957f500 Fix detection of in-place path_locale when RUN_IN_PLACE=0
broken by 2349d31bae1bfc4d58fd88efbc88261e69b11dad (side effect)
fixes #9745
2020-04-27 17:50:05 +02:00
sfan5
13a8ea2dac Add STATIC_LOCALEDIR to BUILD_INFO and move it to version.cpp 2020-04-27 17:50:05 +02:00
Loïc Blot
91c4f7f0ea
Forbid object:attach(obj, ...) (#9762)
Fixes #9761
2020-04-27 11:27:27 +02:00
SmallJoker
be71e70a91
Script: Enforce type checks if not nil (#9748)
* Script: Enforce type checks if not nil
2020-04-27 07:02:39 +02:00
sfan5
515d38a702 Fix truncation warning for F1000_MIN, F1000_MAX 2020-04-27 06:58:34 +02:00
sfan5
8a03097450 script: Put getGuiEngine() inside a client-only #ifdef 2020-04-27 06:58:34 +02:00
sfan5
f6f6dd140f script: Fix add_entity returning unusable ref if object deleted in on_activate 2020-04-27 06:58:34 +02:00
Loïc Blot
e564bf8ead
Add PostgreSQL authentication backend (#9756)
* Add PostgreSQL authentication backend
2020-04-27 06:54:48 +02:00
sfan5
68f45fc130 Remove unused lookup table from noise.cpp
closes #9757
2020-04-26 19:52:09 +02:00
sfan5
eca6ee911a
Fix mapgen settings in minetest.conf being ignored (#9737)
broken since e8a8185d24897ccf964327017effae81aa1c9d40
2020-04-26 19:32:29 +02:00
theviper121
e1fc72c6f3
Fix UpdateBonePosition() breaking animations (#9577) 2020-04-26 19:32:04 +02:00
v-rob
bc60e44d80
Add animated_image to clickthrough elements (#9724) 2020-04-25 16:55:21 +02:00
sfan5
73180a73da
mapblock_mesh: Optimize a few things (#9713) 2020-04-25 12:39:17 +02:00
Paul Ouellette
49ed0ca00a
Ensure game is shutdown if server throws exception (#9742) 2020-04-25 09:42:18 +02:00
Pierre-Yves Rollo
6cc5c7cbb4
Simplify how parseElement splits element string (#9726) 2020-04-25 07:48:04 +02:00
EvidenceB Kidscode
cee3c5e73d
Add server side translations capability (#9733)
* Add server side translations capability
2020-04-25 07:20:00 +02:00
luk3yx
914dbeaa0b
Add LevelDB auth database. (#9476)
* Add leveldb auth database.
2020-04-23 13:07:19 +02:00
SmallJoker
ce5b0932f8
Camera: Fix shootline line offsets II (#9730) 2020-04-23 12:16:36 +02:00
Maksim
6ba44d7452
Android: add OpenGL ES 2 support (#9715)
.. and bump gradle to 3.6.3
2020-04-22 20:03:46 +02:00
HybridDog
4361bfcb4d
Fix configuration caching in log_deprecated (#9697)
* Fix configuration caching in log_deprecated

The configured variable was never set to true.
I've set the variables to thread_local because the configuration should be reloaded after reentering the world from mainmenu.
2020-04-22 00:07:12 +02:00
sfan5
8ef239b448
Improve protocol-level receiving code (#9617) 2020-04-20 23:22:00 +02:00
sfan5
338195ff25
Fix alias handling of get_content_id (#9712)
fixes #9632
2020-04-19 19:07:54 +02:00
Danila Shutov
cdbe3c5e57
Reuse object_shader for "wielditem" and "item" entity drawtypes (#9537) 2020-04-19 18:47:13 +02:00
sfan5
87829cd744
script: Move SAO usability check so that it covers all functions (#9698)
see also 91eef646a59575bd9ae792e257bb6ad12fafc0b1
2020-04-18 17:21:58 +02:00
DS
4fb6b6afa7
Formspec: allow lists to change size and existence while the formspec is open (#9700)
Fixes #9640.
2020-04-18 17:21:10 +02:00
DS
241bf44260
Apply a scrollbar's default value to scroll containers (#9699)
Fixes #9691.
2020-04-18 17:20:20 +02:00
HybridDog
7b57d3f613
serverpackethandler: Reduce pkt->getPeerId() invocations and more (#9689) 2020-04-18 17:19:53 +02:00
Maksim
23c6d0c31f
Android: fix handling non-latin characters on older Android devices (#9309) 2020-04-17 23:46:30 +02:00
Wuzzy
e88719bcdd
Rename "subgame" to "game" in 2 error messages (#9680) 2020-04-17 08:10:28 +02:00
Loïc Blot
7539267d37
Add an option to disable unittest build, & disable them on Docker build (#9677) 2020-04-16 20:43:49 +02:00
Loïc Blot
093e79ea78
Drop -Wabi useless flag (#9676) 2020-04-16 19:21:47 +02:00
Maksim
57038b3cb4
Android: fix formspec input for AArch64 devices (#9685) 2020-04-16 19:19:47 +02:00
SmallJoker
45999b74e6
Camera: Fix shooting line offsets (#9681)
Removes duplicated offset calculations from Game and use whatever the Camera class returns.
This keeps the eye position nicely in sync, and gets rid of duplicated code.
2020-04-16 18:32:07 +02:00
sfan5
5cbe8437a8
Swap out -ffast-math for a safe subset of optimization flags (#9682)
It caused more trouble than its worth.
fixes #3943, fixes #5330
2020-04-16 10:23:48 +02:00
Loïc Blot
e8ac5a31cf
Optimize get_objects_inside_radius calls (#9671)
* Optimize getObjectsInsideRadius calls

our previous implementation calls the ActiveObjectMgr to return ids and then lookup those ids in the same map and test each object
Instead now we call the global map to return the pointers directly and we ask filtering when building the list using lamba.

This drop double looping over ranges of active objects (and then filtered one) and drop x lookups on the map regarding the first call results
2020-04-16 08:25:48 +02:00
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