1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00
Commit graph

8062 commits

Author SHA1 Message Date
SmallJoker
3e29afe992 nitpick 2025-06-16 19:19:59 +02:00
SmallJoker
25a319bb23 comments 2025-06-16 18:10:44 +02:00
SmallJoker
4b3a809021 Fix missing clear 2025-06-15 16:54:52 +02:00
SmallJoker
0fe91a7a23 make independent 2025-06-10 19:02:30 +02:00
SmallJoker
bf6ca40b27 Formspec: Show/update the player inv using core.show_formspec
'core.show_formspec' now shows and updates the inventory formspec as if
it was opened using the hotkey on client-side.
2025-06-10 17:32:13 +02:00
grorp
e452c2900f Don't force-enable tileable_horizontal/vertical for solid nodes 2025-06-07 14:44:09 +02:00
Lars Mueller
f431c12b85 Fix model[] not supporting float frames 2025-06-07 14:43:53 +02:00
sfan5
38255cb6bb Clean up makeScreenshot() and make message translateable 2025-06-07 14:43:26 +02:00
siliconsniffer
4454d71d7d
Formspec: change tabs with ctrl(+shift)+tab (#16167)
This change makes it easier to go to the next/previous tab using keyboard controls.
2025-06-07 14:41:29 +02:00
Lars Müller
fde6384a09
Fix and clean up skeletal animation (#15722)
* Fix attachments lagging behind their parents (#14818)
* Fix animation blending (#14817)
* Bring back cool guy as another .x smoke test
* Add .x mesh loader unittest
* Do bounding box & matrix calculation at proper point in time
* Remove obsolete `SAnimatedMesh`
2025-06-01 23:21:35 +02:00
JosiahWI
0bb87eb1ff
Avoid signal-unsafe operations in POSIX signal handler (#16160) 2025-06-01 15:24:32 +02:00
sfan5
a2460df316 Print Luanti version after ascii art 2025-06-01 15:23:55 +02:00
SmallJoker
535d757563 Formspec: Move GUI event handling to switch/case 2025-05-30 13:05:13 +02:00
SmallJoker
660b1cf9bf Formspec: remove gotText(wstr) remains
These functions are now unused (no caller).
2025-05-30 13:05:13 +02:00
SmallJoker
fcddac6c07 Formspec: Fix malfunctioning 'Proceed' button on sizeless formspecs 2025-05-30 13:05:13 +02:00
sfan5
9f7501d20a Handle writing to unloaded blocks in MMVManip::blitBackAll()
This could happen before and would just silently discard the data,
but now that Lua can create VManips without loading from map beforehand
we definitely need to handle this case.
2025-05-30 13:03:21 +02:00
sfan5
aa1bab2156 Implement API to create empty VoxelManip 2025-05-30 13:03:21 +02:00
sfan5
6274a8dec4 Refactor MMVManip to get rid of m_loaded_blocks 2025-05-30 13:03:21 +02:00
sfan5
41651c7317 Add C++-side unit tests for MMVManip 2025-05-30 13:03:21 +02:00
sfan5
e03957ec0c Add VoxelManip:close() for explicit free 2025-05-30 13:03:21 +02:00
sfan5
79e0d834fd Rework user limit and checks around join process 2025-05-30 13:02:24 +02:00
sfan5
b580c66b61 Restrict minimum state for ClientInterface::sendToAll 2025-05-30 13:02:24 +02:00
sfan5
9ce9d7f433 Extend check for lingering clinets 2025-05-30 13:02:24 +02:00
sfan5
5c2599315c Change nil-component error to deprecation warning 2025-05-28 13:29:30 +02:00
sfan5
6ca9d75f0b Reject NaN and Inf in check_v3d() too
check_v2f() was already doing this
2025-05-28 13:29:30 +02:00
sfan5
ec16fb33d0 Add unit tests for Lua vector reading 2025-05-28 13:29:30 +02:00
sfan5
a5263dc7ed Do not allow vector components to be nil 2025-05-28 13:29:30 +02:00
SmallJoker
94a9b94baf
Formspec: Fix incorrect cell size when using non-default fonts (#16178) 2025-05-27 18:47:41 +02:00
sfan5
da7897a822 Fix texture double-free in main menu
bug introduced in 1214a1d4a6
2025-05-27 13:56:18 +02:00
Josiah VanderZee
fa0c09d202 Do not modify peer timeout on shutdown
Shortening the peer timeout was supposedly necessary at some point
to work around an unknown bug. I was not able to reproduce the bug
running a headless Luanti server on WSL Tumbleweed and connecting with
a client on the Windows host. That is not enough to say the issue no
longer exists. This commit may cause a regression.

The access to change the peer timeout was unsynchronized and done by a
different thread than the sending thread, so it was detected by TSan to
be a data race. Since this patch deletes the code performing the write,
the data race is no longer a concern and no synchronization must be
added.
2025-05-24 22:49:49 +02:00
Josiah VanderZee
e9b32843a5 Make MTP server shutdown flag atomic
I noticed this potential data race while reading the code. I have not
detected it with TSan in practice.
2025-05-24 22:49:49 +02:00
sfan5
1214a1d4a6
Refactor ITextureSource use in main menu (#16135) 2025-05-24 22:49:29 +02:00
sfan5
452160cd00 Clean up read_tiledef and related parts a bit 2025-05-24 22:49:04 +02:00
cx384
d17f22f536
Fix texture coordinates of cuboid drawtypes (#16091)
Fixes issues related to combining animated and world-aligned textures.
Changes texture coordinates of cuboid drawtypes to stay in the [0,1] range, instead of carrying the mapblock alignment and becoming negative after transformations.
2025-05-24 15:59:32 +02:00
SmallJoker
2f1171e2a7
Formspec: Fix broken 9-slice image button with gui_scaling_filter (#16146)
The setting 'gui_scaling_filter = true' previously broke 9-slice images.
With this change, custom button background images now scale the same as
backgrounds created using 'background9[...]' (9-slice images).
2025-05-24 15:58:04 +02:00
Lars Müller
7ac5502fdf
Fix handling of skinned meshes for nodes
Second try after the revert in 8a28339 due to an unexpected regression.

- Rigidly animated models (e.g. the glTF frog node) were not working correctly,
  since cloning the mesh ignored the transformation matrices.
  Note that scaling the mesh needs to occur *after* transforming the vertices.
- Visual scale did not apply to skinned models,
  as resetting the animation overwrote scaled vertex data with static positions & normals.
  For backwards compatibility, we now apply a 10x scale to static, non-glTF models.

We now do scale static meshes, as the bug that caused meshes not to be scaled was limited to skeletally animated meshes,
hence we ought not to reproduce it for skinned meshes that do not take advantage of skeletal animations (e.g. current MTG doors).

However, glTF models (e.g. Wuzzy's eyeballs) up until recently were always affected due to technical reasons
(using skeletal animation for rigid animation).

Thus, to preserve behavior, we:

1. Do not apply 10x scale to glTF models.
2. Apply 10x scale to obj models.
3. Apply 10x scale to static x or b3d models, but not to animated ones.

See also: #16141
2025-05-20 18:37:33 +02:00
Daniel Cristian
4700939949
Fix uninitialized variable warning in generate_srp_verifier_and_salt 2025-05-18 21:59:57 +02:00
SmallJoker
56ecf6d332
Mainmenu: Fix error after ESC in dialog windows (#16130)
The error was caused by fd857374, where 'MenuQuit' was processed after 'try_quit'.
This commit fixes the error by moving the special 'MenuQuit' handling to Lua.
2025-05-18 20:41:42 +02:00
sfan5
8c8b7cb251
Clean up menus properly on client exit (#16150) 2025-05-18 12:13:48 +02:00
SmallJoker
3020c192b2
Client: Disable node specular shader effect (#16113)
This feature needs a proper API integration to result in a correct
in-game appearance. See #15898 for details.

This is a band-aid solution for the 5.12.0 release.
2025-05-17 15:02:47 +02:00
sfan5
8a28339ed3 Revert "Fix handling of skinned meshes for nodes"
It literally breaks torches and doors in MTG.
Regardless of whether this is an oversight or not let's not pull this in so close to release.
This reverts commit 612db5b2ca.
2025-05-14 23:21:33 +02:00
Lars Mueller
612db5b2ca Fix handling of skinned meshes for nodes
- Rigidly animated models (e.g. the gltf frog node) were not working correctly,
  since cloning the mesh ignored the transformation matrices.
  Note that scaling the mesh needs to occur *after* transforming the vertices.
- Visual scale did not apply to skinned models,
  as resetting the animation overwrote scaled vertex data with static positions & normals.
  For backwards compatibility, we only apply a 10x scale to static (.obj) models.
2025-05-14 22:28:33 +02:00
y5nw
57c1ab905c
Migrate existing keycode-based keybindings (#16049)
Co-authored-by: grorp <gregor.parzefall@posteo.de>
Co-authored-by: sfan5 <sfan5@live.de>
2025-05-14 22:15:15 +02:00
Lars Müller
600763dffc
Fix table[] focus regression from f4285a5 (#16136) 2025-05-14 07:25:32 -04:00
grorp
959a8b5b8b
Fix black font and menu header when game exits in background (#16131) 2025-05-14 07:23:53 -04:00
sfan5
5f06885ffa Fix printing SER_FMT_VER_HIGHEST_READ in main.cpp 2025-05-13 18:26:47 +02:00
sfan5
94dd3da2aa Prevent mixing in-tree and out-of-tree builds
This is an easy pitfall to encounter when running an Android build.
2025-05-09 20:25:28 +02:00
lhofhansl
1f9a3b5875 Update src/serverenvironment.cpp
Co-authored-by: sfan5 <sfan5@live.de>
2025-05-05 07:50:45 -07:00
Lars
05513467b6 Some ActiveBlockList improvements 2025-05-05 07:50:45 -07:00
Lars Mueller
747857bffa Implement helpful __tostring for all userdata-based classes 2025-05-04 16:32:17 +02:00