1
0
mirror of https://github.com/minetest/minetest.git synced 2025-07-04 00:40:24 +02:00

542 Commits

Author SHA1 Message Date
5b37614d23 Use unique_ptr for trivial ownership (#16300) 2025-07-03 17:32:46 +02:00
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
79e0d834fd Rework user limit and checks around join process 2025-05-30 13:02:24 +02:00
9ce9d7f433 Extend check for lingering clinets 2025-05-30 13:02:24 +02:00
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
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
0cf1c47f6c Fix scrollbar on ContentDB grid by adding an area label (#16042)
Co-authored-by: rubenwardy <rw@rubenwardy.com>
2025-04-21 12:33:41 +02:00
dea95c7339 Reduce transitive includes by moving a class 2025-03-30 18:17:19 +02:00
251bf0ec31 Fix possible nullptr dereference in serverpackethandler.cpp 2025-03-26 18:31:27 +01:00
e0378737b7 Fix overrideable hand ToolCapabilities and range (#15743) 2025-03-16 20:03:31 +01:00
afb15978d9 Clean up and compress some pre-join packets (#15881) 2025-03-11 20:00:07 +01:00
7892541383 Various random code cleanups 2025-03-04 19:53:01 +01:00
24c1230c7b Client: fix disappearing node inventories on older servers
ee9258ce introduced a logic error, which caused clients to lose
node metadata when they should not and vice-versa.
See also: server.cpp / Server::sendAddNode
2025-03-01 21:05:17 +01:00
ee9258cefd Clean up some packet-related code 2025-02-26 12:21:57 +01:00
ba62808fe8 Basic camera control API (#15796) 2025-02-19 18:45:45 +01:00
d027fc9a88 Enable ipv6_server by default 2025-02-15 12:18:07 +01:00
a11d526110 Rework socket IPV6_V6ONLY handling 2025-02-15 12:18:07 +01:00
dd0070a6b8 Expose client version information in non-debug builds (#15708)
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
Co-authored-by: Lars Mueller <appgurulars@gmx.de>
Co-authored-by: sfan5 <sfan5@live.de>
2025-02-09 18:09:07 +01:00
a73e71510a Clamp client-sent movement speed control (#15721)
Results in the `movement_x` and `movement_y` fields of `player:get_player_control()` being safe to use
(otherwise users would need to compute the length as `(x^2 + y^2)^0.5` and clamp that to 1 themselves).
2025-02-04 12:19:00 +01:00
b2a6c3ba23 Server: undo inventory client prediction
The affected player inventory list is now marked as modified.
This way, it will also be re-sent if the server denies the action.
2025-02-02 19:05:09 +01:00
c0422b18e7 Propagate peer ID change to outgoing reliables (#15680)
Otherwise a desync could ocurr since the server does strict checking.
fixes #15627
2025-02-01 13:23:00 +01:00
e8f6127779 Reduce irrlicht_extrabloated.h includes in header files 2025-01-04 12:39:34 +01:00
DS
bcbee873e8 Use openssl's sha1 and sha256, optionally (#15472) 2024-12-10 22:00:43 +01:00
c175046d30 Network: Fix serialization version checks (#15477)
This fixes some incorrect assumptions that the read and write version ranges are identical - whereas they're in fact not.
2024-11-27 18:39:57 +01:00
b77ad82fb9 Sanitize invalid particle spawner time (#15465) 2024-11-24 19:23:53 +01:00
138052adfc Add particle blend mode "clip" (#15444)
This lets modders avoid alpha blending rendering bugs as well as potential (future) performance issues.
The appropriate blend modes are also used for node dig particles.

---------

Co-authored-by: sfan5 <sfan5@live.de>
2024-11-19 13:30:17 +01:00
03cf7a8e05 Make Luanti buildable for macOS 10.15 also. (#15352) 2024-10-28 19:40:28 +01:00
d849d51c2d Replace licensing text in headers (LGPLv2.1) (#15321) 2024-10-28 15:57:39 +01:00
b61c83a19d Move some more sources to shared target 2024-10-16 19:39:59 +02:00
067a5b5ac3 Fix local animations not working (was broken in 06907aa) 2024-10-13 15:48:39 +02:00
1b2d24791a Separate anticheat settings (#15040) 2024-10-11 12:01:22 +02:00
06907aa99b Support floating-point animation frame numbers 2024-10-10 21:39:57 +02:00
6ac4447134 Make bloom parameters server-controlled (#15231) 2024-10-09 15:08:03 +02:00
13f533d490 scrollcontainer: Add automatic scrollbar calculation (#14623)
New parameter 'content padding'. When specified, the scrollbar
max value is calculated automatically. This aims to reduce manual
calculation functions.
2024-10-08 21:45:27 +02:00
3797ca52c4 Network: offload often changed constants to source file (#15207)
* Network: offload often changed constants to source file

This prevents unnecessary recompiling when using incremental builds.
There is also no need to have separate max proto version variables;
as they're subject to the handshake between client and server. The
code is also expected to support the same version (or higher).

Co-authored-by: sfan5 <sfan5@live.de>
2024-10-02 11:01:30 +02:00
22ef4c8be1 Expose analog joystick input to the Lua API (#14348) 2024-10-01 17:21:42 +02:00
fbb0e82679 Fix uninitialized shadow tint regression from #14610 (#15197)
* Fix uninitialized shadow tint

This resulted in shadows having a different, random color each time I started a game

* Fix formatting mistakes from the same PR
2024-09-27 11:08:35 +02:00
526a2f7b8c Dehardcode the death formspec (#15155)
Co-authored-by: Paul Ouellette <oue.paul18@gmail.com>
2024-09-24 22:37:44 +02:00
d8f1daac25 Visual Effects Vol. 1 (#14610)
This PR adds a variety of effects to enhance the visual experience.

    "soft" clouds look
    Tinted shadows
    Crude water reflections (sky and sun) and waves
    Translucent foliage
    Node specular highlights
    Adjusted fog color (more saturated where the fog is lighter)
    Minor changes to volumetric lighting (crudely simulates the effect of depth)

Co-authored-by: sfan5 <sfan5@live.de>
2024-09-24 11:14:27 -07:00
38b4505ad7 Allow requesting reconnect when mods kick player (#14971) 2024-09-12 23:42:46 +02:00
72c306d920 Improve some protocol code log messages
also get rid of the very noisy socket debug message that are
useless in a world where Wireshark exists.
2024-09-12 23:41:56 +02:00
f54f2c1601 Fix RTT set before value is available 2024-09-12 23:41:56 +02:00
42af7cc1c5 Nerf protocol window sizes
Probably due to a unit misunderstanding a long time ago the window sizes
were quite insane (especially the default).
In practice this was sometimes hidden by other bugs, games trying their
best to be lightweight or didn't matter on high-quality internet connections.
2024-09-12 23:41:56 +02:00
9c2b2c002c Count duplicate packets as congestion indicator 2024-09-12 23:41:56 +02:00
d5d8fb629b Simplify TOSERVER_INIT and TOCLIENT_HELLO
- Network compression support was never added.
- Client hasn't used the returned playername since at least 0.4-stable.
2024-09-02 21:50:43 +02:00
e55fb6da71 Mark a bunch of classes as final 2024-09-02 21:50:13 +02:00
0c4f03d9a5 Reduce include count in headers 2024-09-02 16:09:32 +02:00
8972c80d7d Warn if max_packets_per_iteration reduced 2024-08-31 20:47:38 +02:00
1380bf9b88 Fix ordering issue with new server peers 2024-08-31 20:47:38 +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