1
0
mirror of https://github.com/minetest/minetest.git synced 2025-07-05 17:30:21 +02:00

319 Commits

Author SHA1 Message Date
50928b9759 Mapgen: Add rudimentary unittests 2024-12-08 20:27:33 +01:00
3e10d9ccf5 Refactor: Merge [IC]SkinnedMesh into SkinnedMesh (#15511) 2024-12-06 18:03:44 +01:00
e545e96d2b Make string to v3f parsing consistent, replace core.setting_get_pos() by core.settings:get_pos() (#15438)
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
2024-12-04 18:19:46 +01:00
a4d1b5b155 Fix script security path normalization in presence of links (#15481) 2024-12-03 16:51:34 +01:00
794aea8e92 Drop fixed pipeline support code (#15421)
OpenGL 2.0 is now mandatory.
2024-11-13 14:24:01 +01:00
c00129360e Remove unused pos_max_d 2024-11-12 10:52:46 +01:00
f916f5de78 Add basic unit tests for collisionMoveSimple 2024-11-12 10:52:46 +01:00
d849d51c2d Replace licensing text in headers (LGPLv2.1) (#15321) 2024-10-28 15:57:39 +01:00
DS
e5d321d286 Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
c7938ce81c Improve glTF logging (#15274)
Also removes all animations but the first one from gltf_frog.gltf
to address the corresponding warning.

Catches some more possible exceptions (out of bounds, optional access)
which might be caused by a broken model to properly log them.
2024-10-15 12:19:19 +02:00
e3aa79cffb Gettext and plural support for client-side translations (#14726)
---------

Co-authored-by: Ekdohibs <nathanael.courant@laposte.net>
Co-authored-by: y5nw <y5nw@protonmail.com>
Co-authored-by: rubenwardy <rw@rubenwardy.com>
2024-10-13 11:29:08 +02:00
c8dc9c2b8d Increase safety checks around ObjectRefs 2024-10-12 22:37:17 +02:00
6d5103900f Some refactoring and fixes to VoxelArea and VoxelManip
In particular this validates the edges of VoxelArea and fixes
all the nonsense tests uncovered by it.
2024-10-12 22:37:17 +02:00
2188adc0f9 Ensure that null C strings do not break logging (#15255) 2024-10-12 22:34:24 +02:00
323fc0a798 Add glTF animation support 2024-10-10 21:39:57 +02:00
521e678d39 Add binary glTF (.glb) support 2024-10-10 21:02:05 +02:00
c8f1efebea Use execvp in fs::RecursiveDelete() 2024-10-10 17:40:06 +02:00
87a42d62b2 Fix GLTF test depending on irrlicht internals & memory leaks
Co-authored-by: Lars Mueller <appgurulars@gmx.de>
2024-10-09 16:25:02 +02:00
3a7c8279bf Split log.h to speed up compilation (#15258) 2024-10-09 16:24:44 +02:00
d08d34d803 ABM without_neighbors (#14116) 2024-09-26 17:32:55 +02:00
6d01ed5d74 irr_ptr: Allow to use with forward-declared types
Also add [[nodiscard]] to ::grab() (because similar named irr_ptr::grab() returns void).
And use new std::is_convertible_v.
2024-09-18 12:19:40 +02:00
486dc3288d VoxelManipulator code cleanup (#15114)
* Cache node in voxel area index when possible

The index function according to the MSVC profiler actually takes up a significant time slice (around ~5% of total time for the process) during normal game-play.
Might not be accurate but still good to not recalculate it twice.

* Remove `setNodeNoRef` from VM

* VM: remove old commented out print statement
2024-09-04 15:20:39 +02:00
ac11a14509 Add static glTF support (#14557)
Co-authored-by: Lars Mueller <appgurulars@gmx.de>
Co-authored-by: jordan4ibanez <jordan4ibanez@users.noreply.github.com>
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
2024-09-02 14:50:30 +02:00
1b8b84bee8 connection: Remove unused timeout feature
Was only used for a unit test and incorrectly at that.
2024-08-31 20:46:27 +02:00
c893e0b72b Convert nodedef tests to Catch2 (#15045)
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
2024-08-28 15:36:02 +02:00
7968ab6928 Move network protocol implementation behind an interface 2024-08-21 21:40:58 +02:00
c6ef5ab259 Sanitize formspec fields server-side (#14878) 2024-08-21 21:34:46 +02:00
6874c358ea Allow managing object observers
-----

Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
2024-08-16 22:13:16 +02:00
cfa9c83d33 Improve fs::PathStartsWith to handle empty strings (#14877)
`""` does not refer to a proper path, and `fs::PathStartsWith(path, "")` should just return `false`. This is also the case in libraries in other languages where I looked, seems to be common.

The new behavior:
* check early, if `prefix` is empty - return if path is empty or not,
* no special processing for when `path` is empty, the function meets characters in `prefix` and returns false anyway.
2024-08-11 20:19:14 +02:00
ae4cd1ebf1 Corresponding code changes 2024-06-10 21:15:30 +02:00
27cb54c1db Stop misusing volatile keyword 2024-06-10 18:49:43 +02:00
140b9e5a5a Allow game to specify first and last mod in mod loading order (#14177)
Co-authored-by: Lars Mueller <appgurulars@gmx.de>
Co-authored-by: sfan5 <sfan5@live.de>
2024-06-01 16:36:20 +02:00
1298374818 Upgrade client active object mgr tests to Catch2 (#14565)
* Upgrade client active object mgr tests to Catch2

In addition to invoking Catch2's test runner after Minetest's homemade
runner, this refactors the tests to follow the DRY principle, and gives
them expressive names and clear assertions. Catch2 is already bundled
with Minetest, so there are no added dependencies.

* Increment failed modules count for Catch2 tests

* Respect --test-module option for Catch2 tests

* Improve Catch2 --test-module behavior

This switches infostream to rawstream so that test runner output is
displayed, and returns the correct boolean depending on the results. The
tests are now found by setting the configuration instead of invoking the
command line parser.

* Test uniqueness of all IDS instead of just one

Co-Authored-By: Lars Müller <appgurulars@gmx.de>

* Include Catch2 test run in timing and logging

* Flush std::cout after printing Catch results

* Increment total tests run instead of hardcoding to 1

* Flush stderr before printing to stdout

It's necessary to flush stderr before printing to stdout in adition to
flushing stdout before printing to stderr, to make sure all output is
ordered correctly.

* Make Catch write to rawstream

---------

Co-authored-by: Lars Müller <appgurulars@gmx.de>
2024-05-22 18:39:53 +02:00
39fd9b93c3 Introduce proper error handling for file streams 2024-05-14 18:33:08 +02:00
59bf1d8cd9 Fix curl compatibility issues with colorize_url (#14615)
Also move the escape code safety check to guiOpenURL.
2024-05-09 11:31:10 +02:00
1aba7f1fde Add unit tests for MapBlock (de)serialization (#14560) 2024-05-05 22:54:40 +02:00
c044a3c1ca Client: fix unknown texture upon shift-move to full inventory list (#14586)
Fixes a regression caused by 4245a760
'moveItemSomewhere' attempted to add a leftover stack to an empty stack, resulting
in an empty name with non-0 ItemStack count.
2024-04-28 19:45:09 +02:00
fc0ac64277 Fix build errors with curl disabled 2024-04-28 12:31:15 +02:00
d8190e1c5f Some globals (un-)init fixes 2024-04-20 13:03:42 +02:00
DS
5a07f5a652 Fix inconsistent rounding in VoxelLineIterator::VoxelLineIterator (#14555)
floatToInt rounds 0.5 differently depending on sign.
2024-04-20 13:03:34 +02:00
7e4462e0ac Better handling of temporary folders 2024-04-06 12:10:21 +02:00
5df60d85f7 Cache iconv context per-thread 2024-03-30 11:07:02 +01:00
d307d01b18 Fix tests that rely on UTF-8 literals
and the lowercase function
2024-03-28 16:22:04 +01:00
24cc33e704 Add button_url[] and hypertext element to allow mods to open web pages (#13825)
Fixes #12500
2024-03-24 17:19:23 +00:00
5727d74d37 Avoid including client headers on server builds 2024-03-20 16:37:32 +01:00
bc4ab8b99e General code refactoring/improvements in server, treegen and connection 2024-03-20 16:37:32 +01:00
24f2c38093 Split internal parts from connection.h 2024-03-20 16:37:32 +01:00
178943b4b7 Improve ServerEnvironment::getRemovedActiveObjects() in many ways 2024-03-20 16:37:32 +01:00
e3b9828f24 Add unit tests for SAO load / unload behaviour 2024-03-17 15:55:24 +01:00
61a5733692 Unittest: Add inventory callback tests 2024-03-16 20:14:05 +01:00