Commit Graph

6359 Commits

Author SHA1 Message Date
Pascal Abresch 93f1555e2f Remove Craftmethods enum 2021-09-03 16:00:37 +02:00
lhofhansl d1624a5521
Switch MapBlock compression to zstd (#10788)
* Add zstd support.
* Rearrange serialization order
* Compress entire mapblock

Co-authored-by: sfan5 <sfan5@live.de>
2021-08-31 17:32:31 -07:00
pecksin 040aed37ab Remove closing paren as weblink delimiter 2021-08-29 19:30:33 +02:00
sfan5 6a1424f2b1
Async-related script cleanups 2021-08-28 12:15:12 +02:00
savilli 3f1adb49ae
Remove redundant on_dieplayer calls 2021-08-28 12:14:16 +02:00
NeroBurner 1d69a23ba4
Joystick sensitivity for player movement (#11262)
This commit deprecates the forward, backward, left, and right binary
inputs currently used for player movement in the PlayerControl struct.
In their place, it adds the movement_speed and movement_direction
values, which represents the player movement is a polar coordinate
system.

movement_speed is a scalar from 0.0 to 1.0. movement_direction is
an angle from 0 to +-Pi:

	       FWD
	        0
	        _
	 LFT   / \   RGT
	-Pi/2 |   | +Pi/2
	       \_/
	       +-Pi
	       BCK

Boolean movement bits will still be set for server telegrams and
Lua script invocations to provide full backward compatibility.
When generating these values from an analog input, a direction is
considered active when it is 22.5 degrees away from either
orthogonal axis.

Co-authored-by: Markus Koch <markus@notsyncing.net>
Co-authored-by: sfan5 <sfan5@live.de>
2021-08-27 20:24:24 +02:00
Wuzzy 63e8224636
Fix 6th line of infotext being cut off in half (#11456) 2021-08-23 22:13:17 +02:00
SmallJoker eea488ed75
Inventory: Fix rare out-of-bounds access
Co-authored-by: Thomas--S <info@thomas-stangl.de>
2021-08-23 14:10:17 +02:00
DS dad87a360b
Use utf-8 for the Irrlicht clipboard (#11538) 2021-08-23 14:09:50 +02:00
SmallJoker 0c1e9603db
HUD: Reject and warn on invalid stat types (#11548)
This comes into play on older servers which do not know the "stat" type.
Warnings are only logged once to avoid spam within globalstep callbacks
2021-08-21 20:04:04 +02:00
Wuzzy 6fd8aede48
Show status message when changing block bounds (#11556) 2021-08-21 13:53:49 +02:00
sfan5 e7b05beb7d
Validate staticdata and object property length limits (#11511)
Some games provide users with enough freedom to create items
with metadata longer than 64KB, preventing this from causing
issues is on them but we'll still do the minimum not to abort
the server if this happens.
2021-08-19 20:14:22 +02:00
Wuzzy 1320c51d8e
Fix scaled world-aligned textures being aligned inconsistently for non-normal drawtypes 2021-08-19 20:14:04 +02:00
rubenwardy 24b66dede0
Add fwgettext util function 2021-08-19 20:13:25 +02:00
SmallJoker 3b842a7e02 Fix inconsistent integer comparison warnings 2021-08-17 20:00:47 +02:00
Lean Rada 328d949225
Start sprite animation at the beginning (#11509)
When setting a sprite animation, do not keep the last animation's frame number. Setting a new animation should start the animation at the start of the new animation.
2021-08-16 17:56:38 +02:00
sfan5 4419e311a9 Cap iterations of imageCleanTransparent sanely
fixes #11513 performance regression with 256x textures
2021-08-16 17:56:11 +02:00
Treer 963fbd1572
Fix access violation in create_schematic() (#11534)
fixes #11533

Schematics saved from y locations greater than 0 would cause an access violation if layer probabilities were specified
2021-08-16 17:55:35 +02:00
SmallJoker b3b075ea02 Fix segfault caused by shadow map on exit 2021-08-12 20:08:39 +02:00
x2048 442e48b84f
Move updating shadows outside of RenderingCore::drawAll. (#11491)
Fixes indirect rendering modes such as some 3D modes mentioned in #11437 and undersampled rendering.
Does not fully fix anaglyph 3d mode.
2021-08-12 20:07:09 +02:00
DS 0709946c75
Fix a segfault caused by wrong textdomain lines in translation files (#11530)
* The problem were lines like these:
  "# textdomain:"
* str_split does not add an empty last part if there is a delimiter
  at the end, but this was probably assumed here.
2021-08-12 20:06:18 +02:00
DS 1ab29f1716
Fix GUIEditBoxWithScrollBar using a smaller steps than intlGUIEditBox (#11519) 2021-08-08 18:59:45 +02:00
Pevernow c6eddb0bae
Gettext support on Android (#11435)
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: =?UTF-8?q?Olivier=20Samyn=20=F0=9F=8E=BB?= <code@oleastre.be>
2021-08-08 18:59:07 +02:00
SmallJoker 4a3728d828 OpenAL: Free buffers on quit 2021-08-03 20:29:55 +02:00
SmallJoker 32cb9d0828
Mods: Combine mod loading checks and deprection logging (#11503)
This limits the logged deprecation messages to the mods that are loaded
Unifies the mod naming convention check for CSM & SSM
2021-07-31 19:54:52 +02:00
Wuzzy e7cd4cfa25
Fix /emergeblocks crashing in debug builds (#11461)
The reason for the bug was an u16 overflow, thus failing the assert. This only happened in Debug build but not in Release builds.
2021-07-31 19:54:40 +02:00
hecks 1e2b638881 Remove unsupported formats from the media enumerator 2021-07-29 22:42:47 +02:00
hecktest 28c98f9fa5 Remove unsupported extensions from list in tile.cpp 2021-07-29 21:47:08 +02:00
hecks 80d12dbedb
Add a simple PNG image encoder with Lua API (#11485)
* Add a simple PNG image encoder with Lua API
Add ColorSpec to RGBA converter
Make a safety wrapper for the encoder
Create devtest examples

Co-authored-by: hecktest <>
Co-authored-by: sfan5 <sfan5@live.de>
2021-07-29 05:10:10 +02:00
sfan5 6e8aebf432
Add bold, italic and monospace font styling for HUD text elements (#11478)
Co-authored-by: Elias Fleckenstein <eliasfleckenstein@web.de>
2021-07-27 19:11:46 +02:00
JosiahWI cf136914cf
Take advantage of IrrlichtMt CMake target (#11287)
With the CMake changes to IrrlichtMt, it's now possible to use a target for IrrlichtMt.
Besides greatly improving the ease of setting up IrrlichtMt for users building the client, it removes the need for Minetest's CMake to include transitive dependencies such as image libraries, cleaning it up a tiny bit. The PR works by finding the IrrlichtMt package and linking to the target it provides. If the package isn't found and it isn't building the client, it will still fall back to using just the headers of old Irrlicht or IrrlichtMt.
2021-07-27 19:11:27 +02:00
x2048 bf3acbf388
Distribute shadow map update over multiple frames to reduce stutter (#11422)
Reduces stutter and freezes when playing.

 * Maintains double SM and SM Color textures
 * Light frustum update triggers incremental generation of shadow map into secondary 'future' textures.
 * Every incremental update renders a portion of the shadow draw list (split equally).
 * After defined number of frames (currently, 4), 'future' and 'current' textures are swapped, and DirectionalLight 'commits' the new frustum to use when rendering shadows on screen.

Co-authored-by: sfan5 <sfan5@live.de>
2021-07-25 12:36:23 +02:00
hecks a049e8267f
Remove unused ITextSceneNode header (#11476)
Co-authored-by: hecktest <>
2021-07-22 00:55:20 +02:00
hecks 850293bae6
Remove unused header includes 2021-07-21 22:07:13 +02:00
sfan5 6caed7073c Fix no locales being generated when APPLY_LOCALE_BLACKLIST=0
Also enable `ky` which appears to work fine.
2021-07-20 17:58:47 +02:00
SmallJoker 40bee27e56 CSM: Do not index files within hidden directories
CSM would previously scan for files within .git or .svn directories, and also special files such as .gitignore
2021-07-17 16:44:06 +02:00
Wuzzy f4d8cc0f0b
Add wallmounted support for plantlike and plantlike_rooted nodes (#11379) 2021-07-15 21:19:59 +02:00
Wuzzy b7b5aad027
Fix revoke debug privs not reliably turn off stuff (#11409) 2021-07-12 20:32:18 +02:00
sfan5 5c89a0e12a Fix build on Ubuntu 16.04 and macOS
Apparently the C++ standard library is supposed to provide
specializations of std::hash for enums (even in C++11)
but those don't always work for whatever reason.
2021-07-12 12:03:39 +02:00
x2048 effb5356ca
Avoid draw list and shadow map update in the same frame to reduce dtime jitter (#11393)
* Separate draw list and shadows update to reduce jitter

* Avoid draw list update and shadow update in the same frame

* Force-update shadows when camera offset changes
2021-07-11 10:57:29 -07:00
x2048 f5706d444b
Improve shadow rendering with non-default camera FOV (#11385)
* Adjust minimum filter radius for perspective

* Expand shadow frustum when camera FOV changes, reuse FOV distance adjustment from numeric.cpp

* Read shadow_soft_radius setting as float

* Use adaptive filter radius to accomodate for PSM distortion

* Adjust filter radius for texture resolution
2021-07-11 08:15:19 -07:00
hecks 1d25d1f7ad
Refactor video driver name retrieval (#11413)
Co-authored-by: hecktest <>
2021-07-11 09:50:34 +02:00
SmallJoker b93bbfde2c Script API: Fix segfault in remove_detached_inventory
when minetest.remove_detached_inventory is called on script init, the environment is yet not set up,
hence m_env is still nullptr until all scripts are loaded
2021-07-10 14:34:36 +02:00
Warr1024 52128ae11e
Add API for mods to hook liquid transformation events (#11405)
Add API for mods to hook liquid transformation events

Without this API, there is no reliable way for mods to be
notified when liquid transform modifies nodes and mods are
forced to poll for changes.  This allows mods to detect
changes to flowing liquid nodes and liquid renewal using
event-driven logic.
2021-07-09 09:08:40 -04:00
SmallJoker 062fd2190e
Auth API: Error when accessed prior to ServerEnv init (#11398) 2021-06-30 20:42:26 +02:00
hecks 827a7852e2
Remove unsupported video drivers (#11395)
This completely removes any mention of the software and D3D drivers from MT, preventing the user from accidentally attempting to use them. Users who need a software renderer should be asked to install Mesa drivers which offer superior fidelity and performance over the 'burningsvideo' driver.
2021-06-30 20:42:15 +02:00
SmallJoker f2fd443262
Inventory: Make addList() consistent (#11382)
Fixes list clearing for inv:set_list() using same size, since 2db6b07.
addList() now clears the list in all cases. Use setSize() to resize without clearing.
2021-06-30 20:39:38 +02:00
Wuzzy 63fc728a84
Require 'basic_debug' priv to view gameplay-relevant debug info, require 'debug' priv to view wireframe (#9315)
Fixes #7245.
2021-06-24 21:21:19 +03:00
Wuzzy 51bf4a6e26
Perform some quality assurance for translation strings (#11375) 2021-06-23 17:35:50 +01:00
sfan5 c60a146e22
Rework Settings to support arbitrary hierarchies (#11352) 2021-06-23 15:22:31 +02:00