1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-25 13:45:23 +02:00
Commit Graph

1301 Commits

Author SHA1 Message Date
lhofhansl
1a58a2fd2b Fix Camera's far clipping plane for large zooms (#16307)
* Make zoomed view beyond 2000 nodes are rendered correctly.
2025-07-03 17:11:36 -07:00
Lucas OH
5b37614d23 Use unique_ptr for trivial ownership (#16300) 2025-07-03 17:32:46 +02:00
Lars Müller
08bc036311 Remove obsolete SMeshBuffer.h (#16308) 2025-07-03 17:32:35 +02:00
DragonWrangler1
80be9bf76e Add keybinding for world close key (#16250)
Fix according to Lua code style guidelines (grorp)

Fix order in defaultsettings.cpp (grorp)

remove unrequired comment, and whitespace

Co-authored-by: y5nw <y5nw@users.noreply.github.com>
Co-authored-by: grorp <grorp@users.noreply.github.com>
2025-07-01 14:31:26 +02:00
Lars
fcbf05fc30 Use MapBlock::copyTo to fill MeshMakeData 2025-06-27 10:36:33 -07:00
sfan5
2d36d32da8 Tune mesh generation interval and thread count 2025-06-26 16:39:26 +02:00
sfan5
2733df78c4 Skip pointless meshgen updates for air blocks 2025-06-26 16:39:26 +02:00
sfan5
6545710c8e Refactor meshgen-related code 2025-06-26 16:39:26 +02:00
lhofhansl
0ea89d4112 Avoid copying empty blocks for mesh-generation (#16286) 2025-06-25 15:05:34 +02:00
SmallJoker
fdc149f316 Formspec: Show a player inventory using core.show_formspec (#15963)
'core.show_formspec' now shows and updates the inventory formspec as if
it was opened using the hotkey on client-side.
2025-06-22 22:06:47 +02:00
Xeno333
225d2cf916 Make minimap respect drawtype = "airlike" (#16251) 2025-06-13 23:33:10 +02:00
grorp
e452c2900f Don't force-enable tileable_horizontal/vertical for solid nodes 2025-06-07 14:44:09 +02:00
sfan5
38255cb6bb Clean up makeScreenshot() and make message translateable 2025-06-07 14:43:26 +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
SmallJoker
660b1cf9bf Formspec: remove gotText(wstr) remains
These functions are now unused (no caller).
2025-05-30 13:05:13 +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
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
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
grorp
959a8b5b8b Fix black font and menu header when game exits in background (#16131) 2025-05-14 07:23:53 -04:00
Lars Müller
f4285a59ac Purge some dead code (mostly Irrlicht) (#16111)
* Remove obsolete Irrlicht attributes system

* Remove dead GUI element types

* Remove some obsolete Irrlicht headers

* Fix some oopsies from d96f5e1
2025-05-04 16:31:44 +02:00
sfan5
377fa5bb14 Minor improvements to image algorithms
- loop Y around X
- use float over double
2025-05-04 16:31:00 +02:00
sfan5
486fb7cc4d Add caching of generated textures as image 2025-05-03 11:32:41 +02:00
sfan5
9cb78f2dc5 Try to reuse texture objects in TextureSource::rebuildTexture() 2025-05-03 11:32:41 +02:00
sfan5
b841c23701 Clean up TextureSource and related code 2025-05-03 11:32:41 +02:00
sfence
0bdd5f294e Make SDL2 default on macOS (#16039) 2025-05-02 21:28:13 +02:00
SmallJoker
6f3735281f GUI: restore the Pause Menu after closing the Settings Menu 2025-05-02 21:26:34 +02:00
Muhammad Rifqi Priyo Susanto
3e5d9782cc Android: Persistent notification while ingame (#13125)
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
Co-authored-by: grorp <grorp@posteo.de>
2025-04-24 07:38:52 -04:00
Vincent Robinson
233ffbe384 Change exit keybinding and fix bug in allow_close[] 2025-04-23 21:41:32 +02:00
sfan5
2c83c67b7d Move profiler call out of hot path in ClientMap (#16056) 2025-04-23 09:30:58 +02:00
SmallJoker
5c6e4d35b0 Client: protect against circular attachments (#16038)
The server already includes such check. There must be a desync issue that causes
an ID mismatch, resulting in client crashes. Any such crash must be prevented.
2025-04-21 12:33:19 +02:00
sfan5
900cf896db Move NodeShaderConstantSetter to game.cpp 2025-04-21 12:32:29 +02:00
sfan5
f3c2bbfb48 Change shaders to be defined by input constants rather than drawtype/material type 2025-04-21 12:32:29 +02:00
sfan5
baa4c7cd21 Introduce IShaderConstantSetter abstraction 2025-04-21 12:32:29 +02:00
sfan5
b2c2a6ff47 Rename IShaderConstantSetter 2025-04-21 12:32:29 +02:00
sfan5
4c4e296274 Handle texture filtering sanely to avoid blurriness (#16034) 2025-04-21 12:31:44 +02:00
Lars Mueller
e1143783e5 Fix some (MSVC) compiler warnings 2025-04-20 20:49:10 +02:00
y5nw
23bfb2db72 Move keybinding settings to (Lua-based) setting menu (#15791) 2025-04-20 20:20:49 +02:00
Vincent Robinson
fd85737460 Add allow_close[] element to formspecs (#15971) 2025-04-16 16:20:39 -07:00
sfan5
37d2bc8a5f Reuse some allocations in ClientMap rendering 2025-04-15 21:42:39 +02:00
Erich Schubert
78293404c7 Rename perlin noise to value noise (#15858) 2025-04-10 14:39:40 +02:00
sfan5
9d81c02f27 Add/remove/change some log messages for clarity 2025-04-10 14:39:21 +02:00
sfan5
03affa1bbb Some minor code cleanups 2025-04-08 22:24:37 +02:00
cx384
bed36139db Fix struct forward declaration 2025-04-07 01:38:32 +02:00
cx384
52b974184d Move client code out of ItemDefManager (#15967) 2025-04-04 18:58:14 +02:00