| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
* Add zstd support.
* Rearrange serialization order
* Compress entire mapblock
Co-authored-by: sfan5 <sfan5@live.de>
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
|
| |
|
|
|
| |
Finish getNode cleanup
|
|
|
|
|
|
| |
I removed the MapNode constructor which takes a nodename and gives the node's id or CONTENT_IGNORE
The code which used this constructor (two places) now handles the situation of not registered nodes correctly:
* minetest.set_node and similar functions make minetest crash when a not registered node is passed
* reverting a node with rollback aborts if the node is not registered
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* Rename IWritableNodeDefManager to NodeDefManager
* Make INodeDefManager functions const
* Use "const *NodeDefManager" instead of "*INodeDefManager"
* Remove unused INodeDefManager class
* Merge NodeDefManager and CNodeDefManager
* Document NodeDefManager
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `disconnected_*` boxes are the opposites of the `connect_*` ones,
i.e. when a node has no suitable neighbours on the respective side, the
according disconnected box is drawn.
* disconnected_top
* disconnected_bottom
* disconnected_front
* disconnected_left
* disconnected_back
* disconnected_right
* disconnected (when there is *no* neighbour)
* disconnected_sides (when there are *no* neighbours to the sides)
|
|
|
|
|
|
|
|
| |
* Real global textures
* Add world-aligned textures
* Update minimal to support world-aligned tiles
* Update minimal
|
|
|
|
|
| |
Add missing documentation of leveled nodebox to lua_api.txt, plus
a little cleaning up nearby.
|
|
|
|
|
|
|
|
|
|
|
| |
* 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: src/p*, src/q*, src/r*, src/s* (partial)
* empty function
* default constructor/destructor
* for range-based loops
* use emplace_back instead of push_back
* C++ STL header style
* Spelling: vertice -> vertex
|
|
|
|
|
|
|
|
| |
* empty function
* default constructor/destructor
* for range-based loops
* use emplace_back instead of push_back
* remove some unused headers in some cpp variable
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Modernize various files (src/m*)
* range-based for loops
* code style
* C++ headers instead of C headers
* Default operators
* empty function
Thanks to clang-tidy
|
|
|
|
|
|
|
|
| |
Remove usage of the SharedBuffer in zlib compression which has two problems:
* We copied the whole memory block to compress it (not good with mapblocks)
* We copied sometimes strings to SharedBuffer to SharedBuffer (2nd time)
Use this method in MapNode::serializeBulk + optimize serialization but merging 3 identical loops in a single loop
|
|
|
|
| |
This reverts commit 599e13e95e81aadb959c9f3715aec9b425ede084.
|
| |
|
|
|
|
|
|
| |
- Increase ContentFeatures serialization version
- Color property and palettes for nodes
- paramtype2 = "color", "colored facedir" or "colored wallmounted"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Improved getPointedThing()
The new algorithm checks every node exactly once.
Now the point and normal vector of the collision is also returned in the
PointedThing (currently they are not used outside of the function).
Now the CNodeDefManager keeps the union of all possible nodeboxes, so
the raycast won't miss any nodes. Also if there are only small
nodeboxes, getPointedThing() is exceptionally fast.
Also adds unit test for VoxelLineIterator.
* Cleanup, code move
This commit moves getPointedThing() and
Client::getSelectedActiveObject() to ClientEnvironment.
The map nodes now can decide which neighbors they are connecting to
(MapNode::getNeighbors()).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit rewrites the procedure that is responsible for light
updating.
this commit
-provides iterative solutions for unlighting and light spreading
-introduces a new priority queue-like container for the iteration
-creates per-node MapBlock caching to reduce retrieving MapBlocks from
the map
-calculates with map block positions and in-block relative node
coordinates
-skips light updating if it is not necessary since the node's new light
will be the same as its old light was
|
|
|
|
|
|
|
| |
This allows the player to more easily target and punch connected
nodeboxes, especially if they have a fixed nodebox that is very
small, like technic cabling, or xpanes. Tried it on fences and
my xpane conversion, and happy with the result.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We introduce a new nodebox type "connected", and allow these nodes to
have optional nodeboxes that connect it to other connecting nodeboxes.
This is all done at scenedraw time in the client. The client will
inspect the surrounding nodes and if they are to be connected to,
it will draw the appropriate connecting nodeboxes to make those
connections.
In the node_box definition, we have to specify separate nodeboxes for
each valid connection. This allows us to make nodes that connect only
horizontally (the common case) by providing optional nodeboxes for +x,
-x, +z, -z directions. Or this allows us to make wires that can connect
up and down, by providing nodeboxes that connect it up and down (+y,
-y) as well.
The optional nodeboxes can be arrays. They are named "connect_top,
"connect_bottom", "connect_front", "connect_left", "connect_back" and
"connect_right". Here, "front" means the south facing side of the node
that has facedir = 0.
Additionally, a "fixed" nodebox list present will always be drawn,
so one can make a central post, for instance. This "fixed" nodebox
can be omitted, or it can be an array of nodeboxes.
Collision boxes are also updated in exactly the same fashion, which
allows you to walk over the upper extremities of the individual
node boxes, or stand really close to them. You can also walk up
node noxes that are small in height, all as expected, and unlike the
NDT_FENCELIKE nodes.
I've posted a screenshot demonstrating the flexibility at
http://i.imgur.com/zaJq8jo.png
In the screenshot, all connecting nodes are of this new subtype.
Transparent textures render incorrectly, Which I don't think is
related to this text, as other nodeboxes also have issues with this.
A protocol bump is performed in order to be able to send older clients
a nodeblock that is usable for them. In order to avoid abuse of users
we send older clients a "full-size" node, so that it's impossible for
them to try and walk through a fence or wall that's created in this
fashion. This was tested with a pre-bump client connected against a
server running the new protocol.
These nodes connect to other nodes, and you can select which ones
those are by specifying node names (or group names) in the
connects_to string array:
connects_to = { "group:fence", "default:wood" }
By default, nodes do not connect to anything, allowing you to create
nodes that always have to be paired in order to connect. lua_api.txt
is updated to reflect the extension to the node_box API.
Example lua code needed to generate these nodes can be found here:
https://gist.github.com/sofar/b381c8c192c8e53e6062
|
|
|
|
|
|
| |
Get facedir by using lowest 5 bits of param2 and limiting to 23
More robust, frees up higher param2 bits for other uses
Change lookup table and table index to u8
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move debug streams to log.cpp|h
Move GUI-related globals to clientlauncher
Move g_settings and g_settings_path to settings.cpp|h
Move g_menuclouds to clouds.cpp|h
Move g_profiler to profiler.cpp|h
|
|
|
|
| |
NDEBUG is defined), replace those usages with persistent alternatives
|
|
|
|
|
|
|
|
|
| |
Directely or indirectly optimises the following functions:
* MapBlockMesh::MapBlockMesh
* MapBlockMesh::getTileInfo
* MapBlockMesh::makeFastFace
* MapBlockMesh::getSmoothLightCombined
|
|
|
|
|
|
| |
@celeron55
Before patch, function consumes up to ~8% of the main server loop. After, ~0% (below level of 2 places of significance)
|
|
|
|
|
| |
See issue #2017
Applied kahrl's gist
|
| |
|
|
|
|
|
|
|
| |
Leads to the following increases:
getSmoothLight() approx. 40% increase
getTileInfo() approx. 25% increase
MapBlockMesh::MapBlockMesh() 25-30%
|
|
|
|
|
| |
getTileInfo() ~1.5x faster
getSmoothLight ~2.0x faster
|
| |
|
|
|
|
| |
issues
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|