aboutsummaryrefslogtreecommitdiff
path: root/src/mapnode.h
AgeCommit message (Collapse)Author
2022-10-09Embed data directly in mapblocksJude Melton-Houghton
2022-10-09Optimize lighting calculation (#12797)Jude Melton-Houghton
2021-08-31Switch MapBlock compression to zstd (#10788)lhofhansl
* Add zstd support. * Rearrange serialization order * Compress entire mapblock Co-authored-by: sfan5 <sfan5@live.de>
2021-03-30Degrotate support for mesh nodes (#7840)Vitaliy
2020-12-15Allow configuring block disk and net compression. Change default disk level.Lars
2020-05-19Rework functionality of leveled nodes (#9852)Wuzzy
Co-authored-by: sfan5 <sfan5@live.de> Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
2019-03-07Abort when trying to set a not registered node (#7011)HybridDog
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
2018-12-22mapnode: add const/noexcept (#8009)Vitaliy
2018-02-10Node definition manager refactor (#7016)Dániel Juhász
* Rename IWritableNodeDefManager to NodeDefManager * Make INodeDefManager functions const * Use "const *NodeDefManager" instead of "*INodeDefManager" * Remove unused INodeDefManager class * Merge NodeDefManager and CNodeDefManager * Document NodeDefManager
2017-10-15Real global textures (#6105)Vitaliy
* Real global textures * Add world-aligned textures * Update minimal to support world-aligned tiles * Update minimal
2017-09-18Leveled nodebox: Change levels from 1/63rds to 1/64thsparamat
Add missing documentation of leveled nodebox to lua_api.txt, plus a little cleaning up nearby.
2017-08-19Code modernization: src/m* (part 3)Loic Blot
* empty function * default constructor/destructor * for range-based loops * use emplace_back instead of push_back * remove some unused headers in some cpp variable
2017-08-18Modernize various files (src/m*) (#6267)Loïc Blot
* 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
2017-08-17C++ modernize: Pragma once (#6264)Loïc Blot
* Migrate cpp headers to pragma once
2017-01-23Add hardware node coloring. Includes:Dániel Juhász
- Increase ContentFeatures serialization version - Color property and palettes for nodes - paramtype2 = "color", "colored facedir" or "colored wallmounted"
2017-01-04Fixes for using std:vector in ABMHander and further perf improvementsLars Hofhansl
2017-01-04Improve getPointedThing() (#4346)Dániel Juhász
* 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()).
2016-10-27Improved lightingDániel Juhász
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
2016-03-21Fix connected nodes' selection boxes.Auke Kok
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.
2016-03-12Nodebox: Allow nodeboxes to "connect"Auke Kok
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
2015-10-02Mapnode: Replace rotateAlongYAxis with improved versionparamat
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
2015-09-22Mapnode: Add rotateAlongYAxisFull supporting 24 facedirsparamat
2015-02-23Optimise MapBlockMesh related functionsgregorycu
Directely or indirectly optimises the following functions: * MapBlockMesh::MapBlockMesh * MapBlockMesh::getTileInfo * MapBlockMesh::makeFastFace * MapBlockMesh::getSmoothLightCombined
2015-02-10Increase MapBlock::actuallyUpdateDayNightDiff() performance by 2-8x. ok ↵Craig Robbins
@celeron55 Before patch, function consumes up to ~8% of the main server loop. After, ~0% (below level of 2 places of significance)
2015-01-18Create empty default constructor for MapNodeCraig Robbins
2015-01-04Remove freezemelt (the remainder of proller nonsense)kwolekr
2014-12-31Add display_gamma option for clientCraig Robbins
2014-12-24Large increase in performanceCraig Robbins
2014-12-10Increase performance of getLight() by at least 2xCraig Robbins
Leads to the following increases: getSmoothLight() approx. 40% increase getTileInfo() approx. 25% increase MapBlockMesh::MapBlockMesh() 25-30%
2014-10-19Custom collision boxes node property.RealBadAngel
2013-11-01Raise the maximum node limit to 0x7fffShadowNinja
As agreed to by kahrl
2013-08-14Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl
2013-07-28Better snow fall, finite liquid transform, leveled nodes apiproller
2013-07-27Weather supportproller
2013-07-14Change ContentFeatures array to a vectorKahrl
2013-07-13Leveled nodeboxproller
2013-07-08Decoration: Handle facedir and wallmounted param2types with schematic rotationkwolekr
2013-02-25Merge pull request #482 from proller/liquidkwolekr
finite liquid
2013-02-24Update Copyright YearsSfan5
2013-02-24Change Minetest-c55 to MinetestPilzAdam
2013-02-24new adjustable finite liquidproller
2012-12-02Smooth day-night transitionsPerttu Ahola
2012-07-23Fix map deserialization and remove old serialization codePerttu Ahola
2012-07-23Increase node id/param0 to 16 bits, leaving param2 always with 8 bitsdarkrose
2012-06-17Custom boxy nodes (stairs, slabs) and collision changesKahrl
2012-06-17Optimize headersPerttu Ahola
2012-06-05Switch the license to be LGPLv2/later, with small parts still remaining as ↵Perttu Ahola
GPLv2/later, by agreement of major contributors
2012-03-15MapBlockMesh, mesh animation system, urgent mesh updates, athmospheric ↵Kahrl
light, removed footprints
2012-01-22Cleanup (some stuff went wrong when reverting 4-byte mapnodes); fix ↵Kahrl
legacy_wallmounted
2012-01-22Node placement / mineral / serialization / iron freq / node_dig callbackKahrl
- Node placement code moved to Lua - Mineral system removed (added default:stone_with_coal and default:stone_with_iron). - MapBlock and MapNode serialization updated. - Mapgen: Frequency of iron increased. - node_dig callback and related changes.