1
0
mirror of https://github.com/luanti-org/luanti.git synced 2026-01-13 12:45:29 +01:00
Commit Graph

8252 Commits

Author SHA1 Message Date
Thierry FOURNIER
a3cc982ecf Add PlayStation 5 DualSense controller support (#16808)
Implements a complete button and axis layout for the PS5 DualSense
controller on macOS, matching Minecraft-style controls:

- Analog sticks: Movement (left) and camera control (right)
- Face buttons: Jump (X), Sneak (Circle), Camera mode (Square),
  Drop item (Triangle)
- Triggers: L2/R2 mapped as analog axes for dig/place actions
- Bumpers: L1/R1 for hotbar navigation
- Stick clicks: L3 for sprint, R3 for zoom
- D-pad: Fly mode, autoforward, minimap, fast movement
- Touchpad click opens inventory
- Options button for pause menu

The layout is automatically detected when a controller named
"DualSense" is connected, or can be manually selected with
`joystick_type = ps5`.

Note: L2/R2 triggers use negative direction (-1) due to their
analog axis range going from -32768 (released) to +32767 (pressed).
2026-01-05 22:35:01 +01:00
y5nw
07b8268d57 Implement secondary keybindings (#16803)
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
2026-01-05 22:34:25 +01:00
sfan5
42906dbe54 Raise MAX_REGISTERED_CONTENT (#16804) 2026-01-04 15:01:25 +01:00
y5nw
ae9843cf3c Allow sneak toggling when player does not have the fly priv (#16781) 2026-01-04 15:01:15 +01:00
SmallJoker
f10203606a Serialize: Fix ItemDef regression introduced by 3d10d4e85 (2)
This restores compatibility with server version == 5.7.0.
The issue was caused by incorrectly assuming that the commit pointed
out by git-blame did introduce the "sound_use*" calls whereas it only
touched these lines without any functional change.

Introducing another check in between does correct this mistake.
2026-01-04 10:45:37 +01:00
sfan5
8e19d382cf Make fs::RecursiveDelete() silent if nothing to do 2026-01-04 00:13:46 +01:00
SmallJoker
497d776851 Serialize: Fix ItemDef regression introduced by 3d10d4e85 2026-01-03 16:33:45 +01:00
SmallJoker
3d10d4e859 Serialize: Throw exception on incomplete reads (#16796)
Several mistakes were made past where the stream was expected to raise
the EOF flag when reaching the end of stream. That is incorrect. The
flag is only raised if the current read operation fails.

This commit unifies all istream compatibility code to use 'canRead'
for reliable EOF detection. An exception is now thrown when a
value cannot be read completely (e.g. missing bytes).
Version comments are added for easier backtracing.
2026-01-03 11:13:14 +01:00
DS
6079d762ce Fix corner case when unknown node ids run out (#16790)
* Fix `NodeDefManager::allocateId()` not terminating after overflow

* MapBlock::correctBlockNodeIds(): Do not ignore errors

Ignoring would lead to information loss, as the local ids were not translated, so they were
replaced by different nodes.
There is `ignore_world_load_errors` to ignore errors.

* Do not advertise without warning for ignore_world_load_errors
2025-12-31 15:19:45 +01:00
SmallJoker
7a73d37aee Client: Fix crash in 'plantlike' nodes with no textures (#16792) 2025-12-31 15:19:23 +01:00
lhofhansl
ed62451ad3 Use std::mutex for the env lock (instead of ordered_mutex) (#16739)
This is helpful with multiple emerge threads.
2025-12-31 12:18:13 +01:00
CrazyladMT
975699a950 Show proper default key name in reset tooltip on keybindings menu (#16777)
* implement 'core.scancode_to_keyname()' and use it to fix something

* fix whitespaces and fix another thing

* ._.

* lol

* rename to get_key_description

* add case for keybindings whose defaults are not bound

* apply y5nw's suggestions

* lmao I'm so dumb
2025-12-30 11:58:52 +01:00
sfan5
1dbb3eae32 Clarify that punch toolcaps are not optional (#16720) 2025-12-28 15:30:25 +01:00
y5nw
6fd46c05ae Translate key names in KeyPress::name() (#16779)
* Make KeyPress::name() return translated key names

* minor
2025-12-27 13:24:57 +01:00
sfan5
46436248de Merge colorized buffers after meshgen (#16763) 2025-12-24 11:58:31 +01:00
CrazyladMT
c7300c1319 Preserve color across newline‑split log messages in chat (#16769) 2025-12-24 11:58:17 +01:00
sfan5
8d1db8413f Make UniqueQueue use unordered_set 2025-12-24 11:57:05 +01:00
lhofhansl
8883c4cb23 Process (a chunk local) liquid queue early when blocks are generated (#16771)
When generating a new chunk, the chunk's liquid queue is processed immediately, instead of adding entries to the global liquid queue. Since the generated have not been sent to the client, this avoids sending duplicate blocks (that interfere with map sending) later when the global liquid queue is processed.
2025-12-24 10:02:26 +01:00
siliconsniffer
f91e58abab Allow taking screenshots in main menu (#16749)
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: siliconsniffer <siliconsniffer@users.noreply.github.com>
2025-12-21 12:08:16 +01:00
lhofhansl
c4dd90b350 Bring back max runstep profiler entry (#16766) 2025-12-21 10:42:01 +01:00
Zughy
0fe6827dae Add alpha channel in HUD text elements (#16730) 2025-12-20 15:14:08 +01:00
Starkiller1St
4cb32467d3 Fix singleplayer lockout when changing password (#16673) 2025-12-20 15:13:04 +01:00
Wuzzy
f567449cd6 Add more information in PlayerHPChangeReason (#16024)
1) Add `node` and `node_pos` field for the `drown` field (analog to `node_damage` type)
2) Add `custom_type` field to allow a standardized way to report more details of the HP change
3) Make `builtin` report a `custom_type` for the HP changes caused by the `/kill` command and `core.do_item_eat`
4) Move the documentation of `PlayerHPChangeReason` to its own section
5) Fill in missing information of said documentation
2025-12-20 15:12:34 +01:00
sfan5
5dee294a72 Fix problem with _LIBCPP_ENABLE_ASSERTIONS 2025-12-14 17:42:42 +01:00
sfan5
5b05fcf8e1 Apply some general fixes to porting code 2025-12-14 17:42:42 +01:00
sfan5
2ecd127f96 Fix errors with fs::RecursiveDelete() on paths that don't exist 2025-12-10 21:32:05 +01:00
Lars Müller
6daf3871e7 Backport PUC Lua 5.4's string.{pack,unpack,packsize} 2025-12-08 23:19:24 +01:00
Zughy
98c6f786f8 get_sky(): return fog_color as well 2025-12-08 23:19:11 +01:00
sfan5
cf696239e4 Profiler and profiler graph improvements 2025-12-07 21:43:27 +01:00
sfan5
607531ea6b Fix some problems with ClientMap::updateDrawList and related 2025-12-07 21:43:27 +01:00
sfan5
4833942e8b Fix mono font not having a shadow by default 2025-12-07 21:43:27 +01:00
OffTheBeatenByte
cc16a55d78 Fix incorrect minimap radar access (#16709)
Keeping as much functionality as possible

Co-authored-by: Tyler Blair <tylerpblair@hotmail.com>
2025-12-06 09:20:48 +01:00
cx384
d4c3529af7 Move serialisation code out of sound_spec.h 2025-11-30 19:26:22 +01:00
cx384
5a799b9b24 Rename sound.h to sound_spec.h
To prevent incude conflicts
2025-11-30 19:26:22 +01:00
cx384
dc48f98a20 Rename hud.h/cpp to hud_element.h/cpp
To prevent include conflicts
2025-11-30 19:26:22 +01:00
cx384
d1ec7a9356 Move SoundMaker out of game.cpp and some refactoring (#16703) 2025-11-30 14:57:44 +01:00
sfan5
7594b19644 Clean up some filesys code 2025-11-28 13:16:41 +01:00
sfan5
5e91322fad Call fsync in safeWriteToFile() 2025-11-28 13:16:41 +01:00
sfan5
06faa3f6ac Fix RemoveLastPathComponent edge case with absolute paths 2025-11-28 13:16:41 +01:00
lhofhansl
e90c724cfd Use emplace instead of insert where applicable (#16699) 2025-11-27 11:27:34 +01:00
sfan5
cd79a91178 Fix missing reference count for fallback font
closes #16696
2025-11-26 22:13:09 +01:00
sfan5
77ce40cf44 Refactor parts of CGUITTFont 2025-11-26 22:13:09 +01:00
sfan5
7579b27ed1 Show warning in mainmenu when debug build 2025-11-25 17:34:21 +01:00
Lars Müller
e7f305fedd Refactor skinned mesh weight data structure (#16655) 2025-11-23 21:17:58 +01:00
a-bad-dev
05f161cf9c Fix typo in function name (#16684) 2025-11-22 09:48:17 +01:00
fetsorn
d959692967 Option to make sky stars deterministic (#16529)
The star constellations are now based on a seed passed in StarParams.
2025-11-22 09:47:15 +01:00
siliconsniffer
b4aa73df70 Add exit confirmation dialog on ESC in main menu (#16164) 2025-11-22 09:46:37 +01:00
sfan5
aff1abd05d Some random code cleanups 2025-11-19 20:00:09 +01:00
sfan5
1f0aa28cf0 Take EVDF_RENDER_TO_FLOAT_TEXTURE into account for post-processing 2025-11-19 20:00:09 +01:00
sfan5
d280d10e29 Check shadow map initialization more carefully 2025-11-19 20:00:09 +01:00