Commit Graph

6484 Commits

Author SHA1 Message Date
sfan5
0ea8df4d64
Socket-related cleanups
Improve error handling on Windows and reduce the size of the `Address` class
2021-12-29 23:01:26 +01:00
ROllerozxa
05573d6d8d
Remove unused (de)serializeAttributes() methods 2021-12-29 23:00:16 +01:00
Vitaliy
9b650b9efb
Add more neighbors on mesh update (#6765) 2021-12-29 22:59:53 +01:00
SmallJoker
481bb90eac Fix segfault in drawItems() due to missing inventory list
This fixes a nullptr dereference when the specified inventory list is not known.
Happens when HUD elements are sent before the required inventory list is created.
2021-12-29 19:20:49 +01:00
savilli
0fa54531d4
Fix check that denies new clients from a singleplayer session 2021-12-28 14:08:21 +01:00
William L. DeRieux IV
cc64a0405a
Automatically use SSE registers for FP operations on i386 (#11853)
use SSE for floating-point operations to avoid issues with improper fp-rounding and
loss of precision when moving fp-data to incompatible or less-precise
registers/storage locations

https://gcc.gnu.org/wiki/FloatingPointMath
https://gcc.gnu.org/wiki/x87note
2021-12-28 14:06:24 +01:00
JosiahWI
7f6306ca96
Restore GCC 5 compatibility (#11778) 2021-12-28 14:05:49 +01:00
sfan5
49f7d2494c Protect font initialization with mutex
fixes #4532
2021-12-18 20:38:33 +01:00
sfan5
b2409b14d0 Refactor trusted mod checking code 2021-12-18 20:37:13 +01:00
sfan5
f405459548 Remove setlocal and setupvalue from debug table whitelist
It's likely that these could be used trick mods into revealing the insecure
environment even if they do everything right (which is already hard enough).
2021-12-18 20:37:13 +01:00
sfan5
8c99f2232b Don't let HTTP API pass through untrusted function
This has been a problem since the first day, oops.
2021-12-18 20:37:13 +01:00
sfan5
8472141b79
Restructure devtest's unittests and run them in CI (#11859) 2021-12-18 20:36:43 +01:00
ROllerozxa
fcf86ded8f
Disable inventory if player's inventory formspec is blank (#11827) 2021-12-13 17:43:29 +01:00
Wuzzy
f71091bf52 Remove creative/damage info in Esc/Pause menu 2021-12-13 17:33:21 +01:00
sfan5
d9d219356a Fix get_bone_position() on unset bones modifying their position
closes #11840
2021-12-06 00:06:49 +01:00
sfan5
ff934d538c
Fix various code & correctness issues (#11815) 2021-12-05 14:40:30 +01:00
SmallJoker
57a59ae92d
Network: Delete copy constructor and use std::move instead (#11642)
This is a follow-up change which disables class copies where possible to avoid unnecessary memory movements.
2021-12-01 20:22:33 +01:00
updatepo.sh
a157256706 Update minetest.conf.example and dummy cpp file 2021-11-27 19:41:45 +01:00
Corey Powell
413be76c63
Implemented disconnect_player (#10492)
Co-authored-by: rubenwardy <rw@rubenwardy.com>
2021-11-26 19:19:40 +00:00
sfan5
87ab97da2a
Fix find_nodes_in_area misbehaving with out-of-map coordinates (#11770)
This ensures that no overflows (side-effects) happen within the find_nodes_in_area function by limiting coordinates like done in the map generation code.
2021-11-26 19:32:41 +01:00
Lejo
b9051386ae
Add Lua bitop library (#9847) 2021-11-26 19:31:05 +01:00
HybridDog
7a1464d783
Minimap: gamma-correct average texture colour calculation (#9249)
This calculates the average texture colour while heeding the sRGB colourspace.
2021-11-26 19:30:49 +01:00
sfan5
206e131854
Add backwards-compatible behaviour if too few CAO textures specified
(#11766)
2021-11-22 17:27:49 +00:00
ExeVirus
52bfbf6ed0
Allow for Game-Specific Menu Music (#11241) 2021-11-22 17:26:46 +00:00
savilli
c9070e54bc
Fix local digging animation (#11772) 2021-11-19 22:31:04 +00:00
Elijah Duffy
cbf658f83d
Lua API: Add rmdir, cpdir and mvdir (#9638)
Co-authored-by: rubenwardy <rw@rubenwardy.com>
2021-11-10 19:10:20 +01:00
Riceball LEE
693f98373b
Localize error messages in mainmenu (#11495)
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: rubenwardy <rw@rubenwardy.com>
2021-11-01 12:27:46 +00:00
Wuzzy
6910c8d920
Fix number of tool uses being off by 1..32767 (#11110) 2021-10-31 22:33:33 +00:00
sfan5
0b95da7ad3 Automatically package MinGW runtime in buildbot 2021-10-31 22:32:48 +00:00
Isabelle COWAN-BERGMAN
532d5b21fd
Add joystick layout for DragonRise GameCube controller (#11467) 2021-10-31 19:17:47 +01:00
rubenwardy
8dfeba02b9 Fix crash on hypertext[] with not enough parts
The length check used < rather than <=, disabling the check when the formspec version
matches the client's FORMSPEC_API_VERSION.

Additionally, it was possible to have fewer parts than required if the formspec version
was greater than the client's FORMSPEC_API_VERSION.
2021-10-25 21:39:40 +01:00
sfan5
4ee643f472 Fixes around emerge handling 2021-10-25 20:31:52 +02:00
Jude Melton-Houghton
1e26e45530
Limit stepheight smoothing to the stepheight and stop smoothing during jumps (#11705) 2021-10-25 20:31:14 +02:00
sfan5
660e63dbae
Fix item duplication if player dies during interact callback (alternative) (#11662) 2021-10-25 20:30:27 +02:00
Wuzzy
d4b89eb106 Fix no_texture.png activation w/ simple leaves 2021-10-22 11:01:42 +02:00
Lars Müller
0d345dc1bd
Fix view bobbing not resetting when resting
partially fixes #11694, also fixes #11692
2021-10-20 21:51:21 +02:00
Wuzzy
86b44ecd82
Add no_texture.png as fallback for unspecified textures 2021-10-20 21:50:16 +02:00
LoneWolfHT
c82ec8b210
Fix compiling on Windows with Visual Studio 2021-10-15 18:16:09 +02:00
rubenwardy
6901c5fae5
Use scoped app storage on Android (#11466)
From November 2021, the Play Store will no longer be accepting
apps which use the deprecated getExternalStorageDirectory() API.

Therefore, this commit replaces uses of deprecated API with the new
scoped API (`getExternalFilesDir()` and `getExternalCacheDir()`).
It also provides a temporary migration to move user data from the
shared external directory to new storage.

Fixes #2097,  #11417 and #11118
2021-10-15 18:14:48 +02:00
Wuzzy
fe7195badb Make /status message easier to read 2021-10-15 18:13:57 +02:00
hecks
02292e03e4
Add embedded PNG texture modifier (#11498) 2021-10-13 17:51:37 +02:00
sfan5
fe5cb2cdfb Remove broken timeout behaviour
Code that relies on `resend_count` was added in 7ea4a03 and 247a1eb, but never worked.
This was fixed in #11607 which caused the problem to surface.
Hence undo the first commit entirely and change the logic of the second.
2021-10-12 20:13:09 +02:00
savilli
6ea558f8ac
Fix player HP desync between client and server 2021-10-12 20:12:49 +02:00
SmallJoker
ecc6f4ba25
Remove a few unused functions reported by callcatcher (#11658) 2021-10-12 20:12:20 +02:00
sfan5
6de8d77e17 Move instead of copy during content install if possible 2021-10-07 00:20:01 +02:00
sfan5
2b5075f0e2 Move archive extraction in content store to async job 2021-10-07 00:20:01 +02:00
sfan5
2d5b7b5fb4 Make fs::extractZipFile thread-safe 2021-10-07 00:20:01 +02:00
emixa-d
9fab5d594c
Add "MINETEST_MOD_PATH" environment variable (#11515)
This adds an environment variable MINETEST_MOD_PATH.
When it exists, Minetest will look there for mods in addition to ~/.minetest/mods/.
2021-10-07 00:19:41 +02:00
lhofhansl
b4b9bee5f2
Reduce shadow jitter (#11668) 2021-10-05 21:54:01 +02:00
Wuzzy
bc71622d21
Fix crash when calling remove/kick/ban_player on start (#11672) 2021-10-05 21:53:47 +02:00
Jude Melton-Houghton
5aa95fef10
Make MetaDataRef:get return nil instead of nothing (#11666) 2021-10-05 15:38:33 +03:00
Wuzzy
4fca601e0c
Add get_server_max_lag() (#11671) 2021-10-05 15:35:55 +03:00
x2048
982e03f60d
Improvements to colored shadows (#11516) 2021-10-01 16:21:53 +02:00
Wuzzy
21113ad410
Split liquid_viscosity to liquid_viscosity and move_resistance (#10810) 2021-10-01 16:21:24 +02:00
x2048
f5040707fe
Order drawlist by distance to the camera when rendering (#11651) 2021-09-27 17:46:08 +02:00
SmallJoker
d51d0f3a5a
Various code improvements
* Camera: Fix division by 0 after view bobbing
* Remove ignored constness
* Connection: Improve window size range limits
2021-09-27 17:45:44 +02:00
TheBrokenRail
3dcf9e963e
Touch UI support for desktop builds (#10729) 2021-09-26 18:04:09 +02:00
sfan5
9f85862b7c Fix "Could not create ITexture, texture needs to have a non-empty name" warning 2021-09-22 18:43:40 +02:00
nia
2628316842
Fix src/util/string.cpp on NetBSD
- iconv() prototype changed from traditional Unix defintion
  to POSIX definition in 9.99.x.
- wchar_t is not a valid character set for iconv. Share code
  with Android for using UTF-32.
2021-09-19 20:23:52 +02:00
DS
e79d6154fc
Fix client-side performance of chat UI (#11612) 2021-09-19 20:23:35 +02:00
Lars Müller
40ea4ddef1
Fix HUD multiline text alignment (#10795) 2021-09-19 20:23:22 +02:00
sfan5
e0529da5c8 Fix trivial typos 2021-09-19 13:54:20 +02:00
sfan5
ad076ede85 Add preprocessor check for weird (incorrect) build configurations 2021-09-19 13:53:44 +02:00
sfan5
fd8a8501bc
Shave off buffer copies in networking code (#11607) 2021-09-17 18:14:25 +02:00
sfan5
ea250ff5c5 Fix GLES2 discard behaviour (texture transparency) 2021-09-17 18:13:50 +02:00
HybridDog
d1e0f73b77 Hide Wself-assign-overloaded and Wself-move unittest compilation warnings
The warnings occured with the clang compiler
2021-09-17 18:13:04 +02:00
ROllerozxa
6fedee16f0
Readd TGA to the list of valid texture formats. (#11598) 2021-09-15 11:12:24 +01:00
Lars Müller
719a12ecac
Chop game background in mainmenu (#10796) 2021-09-14 20:46:02 +02:00
sfan5
4feb799b7e Add Windows-specific CreateTempFile() implementation
Once again MSVC is the only compiler not supporting basic POSIX functionality.
2021-09-14 20:45:41 +02:00
sfan5
b480a3e9fd Fix broken handling of NodemetaChanged packets
fixes #11610
2021-09-12 14:42:01 +02:00
sfan5
75bf9b75ca
Make sure relevant std::stringstreams are set to binary 2021-09-11 21:06:57 +02:00
sfan5
766e885a1b
Clean up/improve some scriptapi error handling code 2021-09-10 23:16:46 +02:00
Jude Melton-Houghton
7423c4c11e
Send to clients node metadata that changed to become empty (#11597) 2021-09-10 23:16:34 +02:00
sfan5
bbfae0cc67
Dynamic_Add_Media v2 (#11550) 2021-09-09 16:51:35 +02:00
NeroBurner
7f3401412e
Fix movement in random_input mode (#11592) 2021-09-05 19:58:50 +02:00
sfan5
31d2b9edcd Don't look for zlib and zstd manually on Windows 2021-09-01 22:20:38 +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