| Commit message (Collapse) | Author | Age |
| |
|
|
|
| |
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
|
|
|
|
|
| |
Add more detailed light detection functions, a function to get the artificial light (torches) and a function to get the sunlight as seen by the player (you can specify timeofday).
Co-authored-by: rubenwardy <rw@rubenwardy.com>
|
| |
|
|
|
| |
plus general improvements to find_node_* functions
|
|
|
|
| |
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
|
|
|
| |
closes #9857
|
| |
|
|
|
|
| |
* Add server side translations capability
|
|
|
|
|
|
|
|
|
| |
* Optimize getObjectsInsideRadius calls
our previous implementation calls the ActiveObjectMgr to return ids and then lookup those ids in the same map and test each object
Instead now we call the global map to return the pointers directly and we ask filtering when building the list using lamba.
This drop double looping over ranges of active objects (and then filtered one) and drop x lookups on the map regarding the first call results
|
| |
|
|
|
|
|
|
|
|
|
|
| |
ServerEnvironment is a huge class with many accessors. In various places it's not needed
Remove it to reduce the ServerEnvironment view.
Idea here is to reduce size of some of our objects to transport lightweight managers and permit easier testing
Pathfinder is now tied to a generic map, not a ServerMap, it can be
ported to client
|
|
|
|
|
|
|
| |
Move LuaEntitySAO to a new dedicated file
Drop TestSAO (useless object)
Drop the old static startup initialized SAO factory, which was pretty useless.
This factory was using a std::map for 2 elements, now just use a simple condition owned by ServerEnvironment, which will be lightweight, that will also drop a one time useful test on each LuaEntitySAO creation. This should reduce server load on massive SAO creation
|
| |
|
|
|
|
|
|
| |
The API implementation is shared between CSM and SSM.
Functions should retrieve a plain env when they do not
need any server-specific functions.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
nodes (#9339)
* Fix pathfinder fail when startpos is over air
* Note down pathfinder restrictions
* Implement real A* search
* Pathfinder: Implement buildPath non-recursively
* Update find_path documentation
* Pathfinder: Check if jump path is unobstructed
* Pathfinder: Fix drop check first checking upwards
* Pathfinder: Return nil if source or dest are solid
* Pathfinder: Use priority queue for open list
|
|
|
|
| |
Followup to the previous commit.
|
|
|
|
|
|
|
|
|
| |
This bug is only exposed by 91eef646a59575bd9ae792e257bb6ad12fafc0b1
independent of the move of get_connected_players from Lua to C++.
Previously, there would be a small time window where the SAO had
its peer ID set to PEER_ID_INEXISTENT but the RemotePlayer was
still linked to the SAO, resulting in an ObjectRef that crashed
on certain function calls (#9387).
|
| |
|
|
|
|
|
| |
Keeping the ObjectRefs around in a table isn't ideal and this allows
removing the somewhat nonsensical is_player_connected() added in 86ef7147.
|
| |
|
|
|
|
| |
This also fixes find_node_near restrictions being ineffective.
|
| |
|
|
|
|
|
| |
Fix some reference counters (memleak)
Map::dispatchEvent: Allocation safety using references
|
|
|
| |
Finish getNode cleanup
|
| |
|
|
|
|
|
| |
Update Android.mk
Remove 'src/client' from include_directories
|
|
|
|
|
| |
* Return intersection point in node coordinates.
* Clarify 'intersection_point' documentation
|
|
|
|
|
|
|
|
|
| |
* Modernize lua read (part 2 & 3): C++ templating assurance
Implement the boolean reader
Implement the string reader
Also remove unused & unimplemented script_error_handler
Add a reader with default value
|
|
|
|
| |
& Satisfy LINT
|
|
|
|
|
|
|
| |
* Modernize lua read (part 1): C++ templating assurance
Implement the float reader
|
| |
|
|
|
|
|
|
|
|
|
| |
* Rename IWritableNodeDefManager to NodeDefManager
* Make INodeDefManager functions const
* Use "const *NodeDefManager" instead of "*INodeDefManager"
* Remove unused INodeDefManager class
* Merge NodeDefManager and CNodeDefManager
* Document NodeDefManager
|
|
|
|
|
|
|
|
|
|
| |
* Add minetest.bulk_set_node call + experimental mod unittest
* Optimize set_node function to prevent triple lookup on contentfeatures
Do only one lookup for old, and try to merge old and new lookup if node is same than previous node
* Add benchmark function + optimize vector population to have real results
|
|
|
|
|
| |
This commit rewrites line_of_sight with VoxelLineIterator.
Stepsize is no longer needed, the results will be always accurate.
|
|
|
|
|
| |
Change default mode to 'quick' as 'full' can lock up a server for a
long time.
|
|
|
|
| |
* Move files around
|
|
|
|
|
|
| |
* Set placer to nil instead of a non-functional one
This requires nil checks in core.rotate_node and core.rotate_and_place.
|
|
|
|
| |
* ServerEnv: Clean up object lifecycle handling
|
| |
|
|
|
| |
Fixes #6294
|
|
|
|
|
|
|
|
|
|
|
| |
* Modernize source code: last par
* Use empty when needed
* Use emplace_back instead of push_back when needed
* For range-based loops
* Initializers fixes
* constructors, destructors default
* c++ C stl includes
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Code modernization: subfolders
Modernize various code on subfolders client, network, script, threading, unittests, util
* empty function
* default constructor/destructor
* for range-based loops
* use emplace_back instead of push_back
* C++ STL header style
* Make connection.cpp readable in a pointed place + typo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Optimize headers (part 2)
* less debug.h in headers
* less remoteplayer.h for everybody
* Cleanup (part 2)
* camera.h: mesh.h
* mapgen.h: mapnode.h
* serverenvironment.h: mapblock.h
* nodedef.h: shader.h
|
|
|
|
| |
* Cleanup various headers to reduce compilation times
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [CSM] Add flavour limits controlled by server
Server send flavour limits to client permitting to disable or limit some Lua calls
* Add limits for reading nodedefs and itemdefs
* flavour: Add lookup node limits
* Merge get_node_or_nil into get_node.
Sending fake node doesn't make sense in CSM, just return nil if node is not available for any reason
* Add node range customization when noderange flavour is enabled (default 8 nodes)
* Limit nodes range & disable chat message sending by default
* Bump protocol version
|
|
|
|
|
|
| |
This commit introduces Raycast, a Lua user object, which can be
used to perform a raycast on the map. The ray is continuable, so one can
also get hidden nodes (for example to see trough glass).
|
|
|
|
|
|
|
| |
Extend documentation, limit area volume
Remove u16 count limitation
* Prevent integer overflow, replace minp/maxp with pos1/pos2
|
|
|
|
|
| |
I also optiized FacePositionCache a bit: I removed a map
lookup and vector copy from both branches of getFacePosition.
|