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

156 Commits

Author SHA1 Message Date
49f48e0a7c Update links and names in the documentation (#16153) 2025-06-22 22:04:42 +02:00
1f9a3b5875 Update src/serverenvironment.cpp
Co-authored-by: sfan5 <sfan5@live.de>
2025-05-05 07:50:45 -07:00
05513467b6 Some ActiveBlockList improvements 2025-05-05 07:50:45 -07:00
9d81c02f27 Add/remove/change some log messages for clarity 2025-04-10 14:39:21 +02:00
a3648b0b16 Add spatial index for objects (#14631) 2025-04-08 08:44:53 +02:00
2602d03b34 Split ABM/LBM from serverenvironment.cpp to own file 2025-03-30 18:17:19 +02:00
db15bc6466 Some more random code cleanups 2025-03-26 20:49:43 +01:00
7b746d21f9 Make sure generated blocks have their timestamp set
behavior change: newly generated blocks are no longer momentarily activated.
this shouldn't matter for anyone and did not consistently apply to all blocks anyway

addresses issue from #15902 for new maps(!)
2025-03-26 20:49:43 +01:00
ed40ea010b Improve edge case handling in LBMManager 2025-03-26 20:49:43 +01:00
3dca2cd26a Strip leading colon from LBM names 2025-03-26 20:49:43 +01:00
71cd25a798 Preserve LBM ordering when running them
(broken in 811adf5d42)
2025-03-26 20:49:43 +01:00
ea1e8797a3 Fix performance bug with applying LBMs 2025-03-26 20:49:43 +01:00
7892541383 Various random code cleanups 2025-03-04 19:53:01 +01:00
abcd2e0b81 Re-save active entities more often if they move a certain distance (#15605) 2025-02-22 16:19:19 +01:00
f2b1cc3e61 Fix situation around aabbox3d default constructor (#15586)
Co-authored-by: JosiahWI <41302989+JosiahWI@users.noreply.github.com>
2024-12-29 14:36:30 +01:00
d1dd044455 Reorder client initialization (#15554)
Previously, ServerEnv created a player instance before they're fully initialized.
This commit moves all initialization steps and callbacks into TOSERVER_CLIENT_READY
^ which includes StageTwoClientInit for player loading or creation
2024-12-24 15:24:56 +01:00
a8ea165042 Replace occurences of 'wiki.minetest.net' with 'wiki.luanti.org' 2024-11-18 00:04:32 +01:00
c00129360e Remove unused pos_max_d 2024-11-12 10:52:46 +01:00
d849d51c2d Replace licensing text in headers (LGPLv2.1) (#15321) 2024-10-28 15:57:39 +01:00
d08d34d803 ABM without_neighbors (#14116) 2024-09-26 17:32:55 +02:00
811adf5d42 Bulk LBMs (#14954) 2024-09-20 15:05:26 +02:00
7ae51382c8 Refactor ABM/LBM related code 2024-09-20 15:05:26 +02:00
6874c358ea Allow managing object observers
-----

Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
2024-08-16 22:13:16 +02:00
cc8e7a569e Switch player names to std::string 2024-08-16 22:13:16 +02:00
9c3c286aab Optimize code patterns around raycasting 2024-05-03 16:28:29 +02:00
92d03f3832 Trivially optimize iteration order in loops
Due to how node data is stored iterating X last provides better cache locality.
2024-05-03 16:28:29 +02:00
bc4ab8b99e General code refactoring/improvements in server, treegen and connection 2024-03-20 16:37:32 +01:00
dfba79f8ff Split servermap.cpp/h off from map.cpp/h 2024-03-20 16:37:32 +01:00
178943b4b7 Improve ServerEnvironment::getRemovedActiveObjects() in many ways 2024-03-20 16:37:32 +01:00
e3b9828f24 Add unit tests for SAO load / unload behaviour 2024-03-17 15:55:24 +01:00
8339594206 Handle static_save changes at runtime and between restarts 2024-03-17 15:55:24 +01:00
2386bfda7e Fix static_save=false not working & related cleanups 2024-03-17 15:55:24 +01:00
ef0009aea7 Sort out server destruction order
fixes #14421
2024-03-17 15:55:24 +01:00
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
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
63a9853811 Remove attached sounds when the active object is removed (#14341) 2024-02-25 22:10:39 +00:00
2b97fead9e Fix some potential iterator invalidation issues 2024-02-16 12:34:40 +01:00
83f779c52d Fix active object adding to not generated block (#14311) 2024-02-04 21:24:08 +01:00
1d9c9710d7 Fix short raycasts missing large objects (#14339)
Increases the tolerance from one node to five nodes.
Also optimizes the "sphere" used for pre-filtering entities
to start in the middle of the line segment rather than at the start.
2024-02-04 14:04:05 +01:00
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
5958714309 Tool specific pointing and blocking pointable type (#13992) 2024-01-22 18:27:08 +01:00
59abf1bb42 Allow active blocks to be generated (#14185) 2024-01-13 10:27:41 -08:00
431444ba9f Extend sanity checks in ActiveBlockList::update
also fixes the space indentation
2023-12-30 00:31:03 +01:00
c99196d363 Do not emerge blocks in the active_object_send_range_blocks range (#14152)
The active object range is about active objects (not blocks). Activate blocks (and hence any object "in" them) in the cone define by the active object range (and fov) when they are loaded (i.e. visible), otherwise ignore them.
2023-12-29 14:18:06 -08:00
777dca7043 Elide MapBlock::contents_cached 2023-12-16 12:51:42 +01:00
c6cf90f67b Change MapBlock content cache to a vector 2023-12-16 12:51:42 +01:00
DS
6106e4e72b Fix sound and particlespawner id generation (#14059)
* Fix server sound ids being reused to early

* Fix particlespawner id generation

It always returned 0.
Also, now the ids always grow, to make a conflict with ids in lua unlikely.
2023-12-01 00:09:53 +01:00
a7e5456099 Server: avoid re-use of recent ParticleSpawner and Sound IDs (#14045)
This improves the reliability when removing and re-adding handles quickly.
Looping through the entire ID range avoids collisions caused by any race condition.
2023-11-29 21:10:19 +01:00
DS
11ec75c2ad ActiveObjectMgr fixes (#13560) 2023-10-09 17:13:04 +02:00
c3114132d3 Improve readability and infos in verbose log (#13828) 2023-09-22 18:41:10 +02:00