Commit Graph

10593 Commits

Author SHA1 Message Date
ROllerozxa
35ad006234
Increase max FPS on Android to 60 (#12373) 2022-06-26 14:38:11 +01:00
JosiahWI
4163c872af
Fix two memleak reports from Coverity (#12466) 2022-06-26 14:37:50 +01:00
Zughy
4b087a0de2
Docs: remove background9 incorrect example (#12464) 2022-06-26 14:37:04 +01:00
SmallJoker
a463620edb
Re-order sound-related code (#12382)
Dropped ServerSoundParams -> moved to ServerPlayingSound. This gets rid of the duplicated
'fade' and 'pitch' values on server-side where only one was used anyway.
SimpleSoundSpec is the basic sound without positional information, hence 'loop' is included.

Recursively added PROTOCOL_VERSION to most functions to reduce the versioning mess in the
future. Per-type version numbers are kept for now as a safety rope in a special case.
2022-06-20 21:56:12 +02:00
sfan5
0b41533763
Annotate light spread functions with comments 2022-06-20 21:24:28 +02:00
sfan5
e92a217bd1 Fix CAO light calculation issue 2022-06-19 13:30:11 +02:00
sfan5
a83d81ff45 Fix updating glow on entities
was broken in #10021 more than 2 years ago(!)
2022-06-17 20:50:24 +02:00
savilli
ae555465ba
Fix zlib (de)compressor memory leaks 2022-06-16 23:53:23 +02:00
Nathanaël Courant
622d857bed Update my name 2022-06-16 21:38:32 +02:00
x2048
0530ec11c0
Add description of privileges (#12021)
* Add description of privileges

* Restructure Privileges section based on feedback

* Suggestion by sfan5

Co-authored-by: sfan5 <sfan5@live.de>

* Suggestion by sfan5

Co-authored-by: sfan5 <sfan5@live.de>

* Incorporate comments by sfan5

Co-authored-by: sfan5 <sfan5@live.de>
2022-06-15 21:39:39 +02:00
sfan5
46e7b51352 Add unittests for entity lifecycle and callbacks 2022-06-15 17:20:07 +02:00
sfan5
e9e721b937 Fix entity related bugs
* Make minetest.add_entity() binary-safe
* Fix on_death pushing dummy ObjectRef instead of nil
2022-06-15 17:20:07 +02:00
ROllerozxa
992f501159 Fix Android input box crash 2022-06-14 19:22:22 +02:00
Zughy
0f3f1a001c
lua_api.txt: add missing backticks 2022-06-13 18:31:33 +02:00
sfan5
804c255941 Improve lua_api.txt a bunch 2022-06-13 18:31:03 +02:00
Shane Liesegang
c10fe7ec18
Fix permissions on workflow-generated macOS builds (#12422) 2022-06-13 18:30:48 +02:00
paradust7
7ffc0268df
Inline triLinearInterpolationNoEase and triLinearInterpolation (#12421)
Performance profiling on Linux AMD64 showed this to be a significant bottleneck. The non-inlined functions are expensive due to XMM registers spilling onto the stack.
2022-06-11 20:01:30 +02:00
Lars Müller
e7d4ec6834
on_deactivate: distinguish removal and unloading (#11931)
Sometimes you need to be able to do removal-related cleanup, such as removing files from disk, or entries from a database. staticdata obviously isn't suitable for large data. The data shouldn't be removed if the entity is unloaded, only if it is removed.
2022-06-11 20:01:14 +02:00
Lars Müller
f4a53f7ee6
No damage effects on hp_max change (#11846) 2022-06-11 20:00:40 +02:00
Lars Müller
3eafcab64e
Builtin: Redo serialize.lua (#11427)
Features:

* Support for arbitrary references, including self-referencing
* Short output, references "long" strings as a bonus
* Around the same speed, potentially slower if long, short keys are present
* Properly works with NaN and inf
2022-06-11 20:00:26 +02:00
Jude Melton-Houghton
ba65e0ace7 Fix LBM docs 2022-06-11 00:41:26 +02:00
sfan5
213d3562bd Fix Gitlab-CI pipelines 2022-06-07 22:56:22 +02:00
sfan5
3ac5a24b12
Sanitize player position and speed server-side (#12396) 2022-06-07 21:27:05 +02:00
x2048
3107c98591
Mapblock Mesh BspTree: Increase the depth of block-level splits
... before going node-level triangle search.
Fixes transparent grass on transparent land
2022-06-07 21:26:31 +02:00
Lars Müller
edc7df5480
core.formspec_escape: Restore backwards compat
Support numbers as arguments by using `string.gsub(text, ...)` instead of `text:gsub(...)` which will coerce `text` to a string
2022-06-06 18:32:28 +02:00
paradust7
951604e29f Remove invalid fps_max on Mac 2022-06-06 12:03:28 +02:00
Zughy
381f84ee27
Bug report template: ask contributors to provide a code snippet (#12405) 2022-06-05 16:12:39 -04:00
sfan5
14c283a623 Fix crash in commit a69b7abe00fb818fd88f3cd04e7f9997ffd21072 2022-06-05 19:00:14 +02:00
rubenwardy
4baf56520d
Android: Add support for sharing debug.txt (#12370) 2022-06-05 17:42:09 +01:00
sfan5
a69b7abe00 Improve LBMManager::applyLBMs() code
Fixes a possible bug for lbms on content ID zero and removes unsafe casts.
2022-06-05 17:48:51 +02:00
rubenwardy
03d86ea0b4
Add register dialog to separate login/register (#12185)
New users find Minetest's account system confusing.
This change moves username/password to a new dialog,
with login and register buttons added to the Join Game tab.

The old registration confirmation dialog is removed in
favour of the new dialog.

Fixes #8138
2022-06-05 17:47:38 +02:00
ROllerozxa
21323ef1ff
Hide "Autosave Screen Size" on Android 2022-06-05 15:20:39 +02:00
savilli
1f39948bc3
Fix BSD iconv declaration 2022-06-05 15:20:29 +02:00
Lars Mueller
e82985c0a1 Document itemstrings with metadata 2022-06-05 15:20:13 +02:00
JosiahWI
8e5bd82c4d
fix integer overflow in mapgen (#11641)
* fix integer overflow in mapgen

Some calculations involving the magic seed had overflow because the result of an intermediate arithmetic step could not fit in an s32. By making the magic seed unsigned, the other operand in the equation will be cast to unsigned, and possibly other operands or intermediate operands. This will result in unexpected behavior if an operand is negative, which is technically possible, but logically should not happen.

* comment noise2d bitshift

While working through the code I was momentarily concerned that the right bitshift in noise2d could fill ones in some cases. It turns out that with signed integers, this is indeed true, but this one is shifting an unsigned integer, so the behavior is as expected. I put a comment here to clarify this, in case someone else wonders the same thing down the line.

* noise2d and noise3d unittests

I have added 3 tests each for noise2d and noise3d, testing all zero inputs, a very large seed (case which caused UB in the old implementation) and some fun primes I picked for no particular reason. This should be sufficient to demonstrate that the behavior of the new implementation has not changed. I used uniform initialization because it is a good feature of C++11. Please do not explode.

* uncomment the noise2d bitshift

This reverts commit 583b77ee9f1ad6bb77340ebb5ba51eb9a88ff51c. It's a
well-defined language semantic; it doesn't need to be commented.

* code cleanliness
2022-06-03 20:51:58 -04:00
sfan5
575caa8015 Properly keep noclip state in Game and ClientMap 2022-06-03 21:48:52 +02:00
sfan5
5f3af7d18b Remove obsolete eye_height related workaround
This was added a long time ago in 42bbd5c9ae06a8d8ffb7915599097ead6f848755
and meant to fix prevent the view becoming black when jumping into a
ceiling, this no longer happens today.
2022-06-03 21:48:52 +02:00
Wuzzy
6a6b579c54
Add helper functions to make tool usable n times (#12047) 2022-06-03 21:47:04 +02:00
ROllerozxa
6d163b72dc
Rework main menu confirmation dialogs (#12356) 2022-06-03 21:46:37 +02:00
Zughy
b72932b445 Docs: remove unimplemented preserve field in crafting recipes 2022-06-03 21:46:26 +02:00
sfan5
9fc018ded1 Fix use-after-free in node meta cleanup
bug introduced in 8908a9101608d3343023b470743ef63f1c44b0b7
2022-05-29 16:30:13 +02:00
sfan5
a9a207685a Reject registering node with empty name
fixes #10769
2022-05-29 14:00:19 +02:00
sfan5
c1d03695d4 Minor code improvements around active block keeping 2022-05-29 14:00:19 +02:00
sfan5
ea74680df4 Immediately activate blocks when a player joins
issue: #10884
This makes it possible for objects to immediately be activated,
but doesn't guarantee it since blocks may still need be emerged.
2022-05-29 14:00:19 +02:00
stefan
bb671c3089 Remove debug.get/setmetatable from security whitelist
fixes #12216
2022-05-29 14:00:19 +02:00
sfan5
1b68fb7683 Don't allow banning in singleplayer
fixes #11819
2022-05-29 14:00:19 +02:00
sfan5
303329f2d6 Handle lua entity HP changes correctly (like punches)
fixes #11975
2022-05-29 14:00:19 +02:00
sfan5
85c824ed13 Make sure real disconnect reason isn't overwritten
bug introduced in 2f32044273d107e82fb1c35d4a0f616fa480cdf0
2022-05-29 14:00:19 +02:00
sfan5
998e4820c9 Fix linking with Postgres libs on older cmake versions
closes #12149
2022-05-29 14:00:19 +02:00
sfan5
5cd7b0c6e4 Remove remains of video mode querying 2022-05-29 14:00:19 +02:00