Commit Graph

481 Commits

Author SHA1 Message Date
sfan5 d8190e1c5f Some globals (un-)init fixes 2024-04-20 13:03:42 +02:00
sfan5 97066bf795 Sanity-check reliable packet size at earlier point 2024-03-30 11:07:20 +01:00
src-tinkerer 08284e420d
Disable default password check in single player (#14493) 2024-03-27 21:46:41 +00:00
sfan5 bc4ab8b99e General code refactoring/improvements in server, treegen and connection 2024-03-20 16:37:32 +01:00
sfan5 24f2c38093 Split internal parts from connection.h 2024-03-20 16:37:32 +01:00
sfan5 dfba79f8ff Split servermap.cpp/h off from map.cpp/h 2024-03-20 16:37:32 +01:00
cx384 234b01a8c2
Item meta pointing range (#14347) 2024-03-17 15:55:38 +01:00
SmallJoker 32f68f35cf
Avoid packets getting sent to disconnected players (#14444)
Many functions expect RemotePlayer to have a valid peer ID,
this however is not the case immediately after disconnecting
where the object is still alive and pending for removal.

ServerEnvironment::getPlayer(const char *, bool) now only
returns players that are connected unless forced to.
2024-03-10 13:24:35 +01:00
Lars Müller bf52d1e624
Fix attached sounds stopping if objects are removed serverside (#14436)
Restores backwards compatibility for death sounds or other sounds that are not supposed to be "cut off" abruptly.

---------

Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: grorp <gregor.parzefall@posteo.de>
2024-03-06 20:36:02 +01:00
sfence 63a9853811
Remove attached sounds when the active object is removed (#14341) 2024-02-25 22:10:39 +00:00
sfan5 492aab20fe Fix compiler warnings 2024-02-24 12:39:12 +01:00
sfan5 e3cc26cb7c
Irrlicht support changes (#14383) 2024-02-19 21:14:47 +01:00
sfan5 6ca214fefc
Introduce `std::string_view` into wider use (#14368) 2024-02-17 15:35:33 +01:00
sfan5 2b97fead9e Fix some potential iterator invalidation issues 2024-02-16 12:34:40 +01:00
cx384 adaa4cc2f3
Move hard coded minimap to builtin (#14071) 2024-02-07 20:13:23 +01:00
SmallJoker e7dbd325d2
RemotePlayer: make peer ID always reflect the validity of PlayerSAO (#14317)
Upon disconnect, RemotePlayer still had a peer ID assigned even though
the PlayerSAO object was maked as gone (for removal). This commit makes
that the following always holds true:

	(!sao || sao->isGone()) === (peer_id == PEER_ID_INEXISTENT)
2024-02-02 22:13:24 +01:00
sfan5 e1f6108789 Revert class forward declaration in {client,server}opcodes.h
closes #14324
2024-01-30 17:04:12 +01:00
sfan5 89f3502b56 Move Server ban check to different point 2024-01-27 10:33:32 +01:00
sfan5 c0f852e016 Change NetworkPacket to reserve instead of resize
also make the bool serialization clearer and move the constructor
to the header file
2024-01-27 10:33:32 +01:00
sfan5 397682a5b0 Clean up client and server command sending / tables 2024-01-27 10:33:32 +01:00
sfan5 6df0de565f Check media requests on the server more carefully 2024-01-23 22:34:36 +01:00
sfan5 9e3a11534f
Allow fog color to be overriden properly (#14296) 2024-01-23 22:33:33 +01:00
savilli 432988a4ad
Fix multiple password changes in one session 2024-01-19 11:50:55 +01:00
sfan5 ee727eb65e Migrate UDPSocket to use poll() 2024-01-17 20:06:11 +01:00
sfan5 bdc124ba41 Require client to consistently use peer ID 2024-01-17 20:05:57 +01:00
sfan5 b2f0a37b18 Rate-limit client connection attempts 2024-01-17 20:05:57 +01:00
sfan5 050152eb90 Do not allocate packet quota to half-open connections 2024-01-17 20:05:57 +01:00
sfan5 3987318f09 Time out when reliables can't be delivered
If one of the channels stalls for whatever reason we can't pretend the connection is fine.
2024-01-17 20:05:57 +01:00
sfan5 9f684eac92 Remove weird command procession limit
it was set to 1 too, wtf?!
2024-01-17 20:05:57 +01:00
sfan5 abf3142b26 Send initial dummy packet as empty
No functional change and no compatibility implicatons
but this better matches what is documented everywhere.
2024-01-17 20:05:57 +01:00
sfan5 eeb873b23c Minor code corrections 2024-01-17 20:05:57 +01:00
sfan5 84d4647329 Scale resend timeout exponentially 2024-01-17 20:05:57 +01:00
sfan5 7acb14f7a1 Use fixed, lower timeout for half-open connections 2024-01-17 20:05:57 +01:00
sfan5 2587302987 Assign peer IDs randomly 2024-01-17 20:05:57 +01:00
sfan5 db88d24ff8 Track connection half-open state 2024-01-17 20:05:57 +01:00
cx384 2ea8d9ca11
Fix out of range enum casts in deSerialize functions (#14090) 2024-01-17 20:05:46 +01:00
sfan5 2c390b5473 Rework client connecting and enable fallback address use 2024-01-07 21:49:05 +01:00
sfan5 20692d54de Some minor cleanups for UDPSocket class 2024-01-07 21:49:05 +01:00
sfan5 dc7fb26921 Extend capabilities of Address class 2024-01-07 21:49:05 +01:00
sfence d0753dddb1
Method add_pos for object/player (#14126) 2024-01-01 22:48:56 +01:00
Desour 322c4a5b2b Rework server stepping and dtime calculation 2023-12-25 10:07:03 +01:00
Lars e0d4a9d575 Make volumetric light effect strength server controllable
- Make volumetric light effect strength server controllable
- Separate volumetric and bloom shader pipeline
- Require bloom to be enable, scale godrays with bloom
2023-12-21 16:21:01 -08:00
Warr1024 7e143cb33d
Manually configurable minimum protocol version (#14054)
Partially address #13483.  Server operators can set a minimum
protocol version to match the game requirements (or any other
restriction they may want), and it's applied as an additional
constraint on top of the baseline compatibility range, optional
strict_protocol_version_checking, and any kick-on-join used by
the game/mods.
2023-12-21 18:53:30 +01:00
Lars Müller 0d61598d8a
Extend bone override capabilities (#12388) 2023-12-20 21:21:53 +01:00
grorp 91ba02449b
Add `touch_controls` boolean to `get_player_window_information()` (#14092) 2023-12-17 20:47:07 +01:00
Gregor Parzefall 33cc29bbda
Allow setting custom third person front view camera offset (#13686)
Co-authored-by: Muhammad Rifqi Priyo Susanto <muhammadrifqipriyosusanto@gmail.com>
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
2023-10-02 13:44:03 +02:00
Gregor Parzefall 56965bc814
Android: Add `field_enter_after_edit[]` formspec element (#13836) 2023-10-01 11:20:50 +02:00
sfan5 d113636a43 Fix UB in NetworkPacket class 2023-09-24 16:46:18 +02:00
SmallJoker 4ef93fe25f
Allow place_param2 = 0 node placement predictions (#13787)
The placement prediction value 0 was accidentally ignored
and made the clients fall back to automatic rotation based
on the node paramtype2 value.

This now changes the internal representation to properly
indicate the disabled state (e.g. 'nil' in Lua).
2023-09-13 13:57:57 +02:00
Lars Müller 25ef8f3934
Fix local animations not resetting
Converts `LocalPlayerAnimation` to a scoped enum to prevent such bugs in the future
2023-07-02 12:47:18 +02:00