summaryrefslogtreecommitdiff
path: root/src/mapnode.cpp
Commit message (Collapse)AuthorAge
* Leveled nodebox: Change levels from 1/63rds to 1/64thsparamat2018-06-03
| | | | | Add missing documentation of leveled nodebox to lua_api.txt, plus a little cleaning up nearby.
* Add hardware node coloring. Includes:Dániel Juhász2017-01-23
| | | | | | - Increase ContentFeatures serialization version - Color property and palettes for nodes - paramtype2 = "color", "colored facedir" or "colored wallmounted"
* Improve getPointedThing() (#4346)Dániel Juhász2017-01-04
| | | | | | | | | | | | | | | | | | | * 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()).
* Improved lightingDániel Juhász2016-10-27
| | | | | | | | | | | | | | 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
* Fix connected nodes' selection boxes.Auke Kok2016-03-21
| | | | | | | 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.
* Nodebox: Allow nodeboxes to "connect"Auke Kok2016-03-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Mapnode: Replace rotateAlongYAxis with improved versionparamat2015-10-02
| | | | | | 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
* Mapnode: Add rotateAlongYAxisFull supporting 24 facedirsparamat2015-09-22
|
* Change i++ to ++iDavid Jones2015-08-25
|
* RotateAlongYAxis: For facedir case, return if param2 >= 4paramat2015-05-03
|
* Move globals from main.cpp to more sane locationsCraig Robbins2015-04-01
| | | | | | | | | | | | 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
* For usages of assert() that are meant to persist in Release builds (when ↵Craig Robbins2015-03-07
| | | | NDEBUG is defined), replace those usages with persistent alternatives
* Optimise MapBlockMesh related functionsgregorycu2015-02-23
| | | | | | | | | Directely or indirectly optimises the following functions: * MapBlockMesh::MapBlockMesh * MapBlockMesh::getTileInfo * MapBlockMesh::makeFastFace * MapBlockMesh::getSmoothLightCombined
* Increase MapBlock::actuallyUpdateDayNightDiff() performance by 2-8x. ok ↵Craig Robbins2015-02-10
| | | | | | @celeron55 Before patch, function consumes up to ~8% of the main server loop. After, ~0% (below level of 2 places of significance)
* Fix facedir > 23 causes segfault in clientCraig Robbins2015-01-09
| | | | | See issue #2017 Applied kahrl's gist
* Remove freezemelt (the remainder of proller nonsense)kwolekr2015-01-04
|
* Increase performance of getLight() by at least 2xCraig Robbins2014-12-10
| | | | | | | Leads to the following increases: getSmoothLight() approx. 40% increase getTileInfo() approx. 25% increase MapBlockMesh::MapBlockMesh() 25-30%
* Optimise getTileInfo()Craig Robbins2014-11-21
| | | | | getTileInfo() ~1.5x faster getSmoothLight ~2.0x faster
* Custom collision boxes node property.RealBadAngel2014-10-19
|
* Cavegen: Respect is_ground_content MapNode setting; fix some code formatting ↵kwolekr2013-11-29
| | | | issues
* Better snow fall, finite liquid transform, leveled nodes apiproller2013-07-28
|
* Weather supportproller2013-07-27
|
* Leveled nodeboxproller2013-07-13
|
* Fix wallmounted rotations along Y axis for 90 and 270 degree caseskwolekr2013-07-08
|
* Decoration: Handle facedir and wallmounted param2types with schematic rotationkwolekr2013-07-08
|
* 6d facedirRealBadAngel2013-03-23
|
* Update Copyright YearsSfan52013-02-24
|
* Change Minetest-c55 to MinetestPilzAdam2013-02-24
|
* darkrose should work at a nuclear power plant.Perttu Ahola2012-07-24
| | | | It'd take years to figure out what caused the accident.
* Fix map deserialization and remove old serialization codePerttu Ahola2012-07-23
|
* Increase node id/param0 to 16 bits, leaving param2 always with 8 bitsdarkrose2012-07-23
|
* Custom boxy nodes (stairs, slabs) and collision changesKahrl2012-06-17
|
* Optimize headersPerttu Ahola2012-06-17
|
* Properly and efficiently use split utility headersPerttu Ahola2012-06-17
|
* Switch the license to be LGPLv2/later, with small parts still remaining as ↵Perttu Ahola2012-06-05
| | | | GPLv2/later, by agreement of major contributors
* MapBlockMesh, mesh animation system, urgent mesh updates, athmospheric ↵Kahrl2012-03-15
| | | | light, removed footprints
* Cleanup (some stuff went wrong when reverting 4-byte mapnodes); fix ↵Kahrl2012-01-22
| | | | legacy_wallmounted
* Node placement / mineral / serialization / iron freq / node_dig callbackKahrl2012-01-22
| | | | | | | | - 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.
* MapNode constructor to allow ndef+namePerttu Ahola2011-11-29
|
* Node definition namesPerttu Ahola2011-11-29
|
* Clean mapnode.h and fix other files accordinglyPerttu Ahola2011-11-29
|
* Completely generalized mesh generation; ContentFeatures serializationPerttu Ahola2011-11-29
|
* GameDef compilesPerttu Ahola2011-11-29
|
* Create framework for getting rid of global definitions of ↵Perttu Ahola2011-11-29
| | | | node/tool/item/whatever types
* Move ContentFeatures to mapnode_contentfeatures.{h,cpp} and clean stuffPerttu Ahola2011-11-29
|
* Fix water-glass and water-lava surfacesPerttu Ahola2011-11-08
|
* Make CONTENT_IGNORE to not block the view when occlusion cullingPerttu Ahola2011-11-03
|
* Automate texture listing for texture atlas makingPerttu Ahola2011-10-18
|
* Header file tweaking; mainly for speedPerttu Ahola2011-10-12
|
* lava!Perttu Ahola2011-08-15
|