aboutsummaryrefslogtreecommitdiff
path: root/src/content_mapblock.cpp
AgeCommit message (Collapse)Author
2016-03-12Allow nodes to specify which sides to connect to.Auke Kok
NDT_CONNECTED attempts to connect to any side of nodes that it can connect to, which is troublesome for FACEDIR type nodes that generally may only have one usable face, and can be rotated. We introduce a node parameter `connect_sides` that is valid for any node type. If specified, it lists faces of the node (in "top", "bottom", "front", "left", "back", "right", form, as array) that connecting nodeboxes can connect to. "front" corresponds to the south facing side of a node with facedir = 0. If the node is rotatable using *simple* FACEDIR, then the attached face is properly rotated before checking. This allows e.g. a chest to be attached to only from the rear side.
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
2016-02-26Remove new_style_waterRealBadAngel
2016-02-08Cleanup selection mesh code, add shaders for halo and selection boxesRealBadAngel
2015-10-04Add new ContentParamType2 "CPT2_DEGROTATE"est31
This might break some mods, but it is important for all uses of the param2 to be documented. This doesn't need a serialisation version or network protocol version change, as old clients will still work on new servers, and it is bearable to have new clients getting non rotated plants on old servers.
2015-09-14Firelike drawtype: Improve codeparamat
Remove unusable fine rotation by param2 Remove unused and redundant code Fix code style issues
2015-08-25Change i++ to ++iDavid Jones
2015-04-01Move globals from main.cpp to more sane locationsCraig Robbins
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
2015-03-31Move texture_min_size even further down the pipe. Now, textures are ↵Aaron Suen
JIT-upscaled using an image transformation, right at the time they're added to a mesh or particle; images used in 2D elements are left unscaled. This should fix any remaining issues with HUD elements.
2015-03-21Connect rails with connect_to_raillike and shorten the codesSmallJoker
2015-03-07For usages of assert() that are meant to persist in Release builds (when ↵Craig Robbins
NDEBUG is defined), replace those usages with persistent alternatives
2015-03-05Improve group-based connection between raillike nodesBlockMen
2015-03-05Replace std::list to std::vector into tile.cpp (m_texture_trash) and move ↵Loic Blot
tile.hpp to src/client/
2015-03-05Fix some rendering glitchesBlockMen
- Fixes particle draworder - Fixes nodehighlighting
2015-01-31Fix NDT_GLASSLIKE normalsKahrl
Remove inventorycube() workaround for default:glass in minimal game
2014-12-19Fix visual_scale for plantlike nodes (again)Vanessa Ezekowitz
fixes #1989 move the plant to the bottom of its node properly, without affecting its scale. See isue #1989
2014-12-18Fix visual_scale for NDT_PLANTLIKE being set too smallCraig Robbins
2014-11-20Fix raillike bug (currently manifests itself on Android), and minor ↵Kodexky
improvement to readability. NB: Minor edits to patch made by Zeno- (int to short and minor formatting)
2014-11-19Fix wallmounted mesh rotationsShadowNinja
2014-10-29Add option to enable mesh caching, add wallmounted for meshes.RealBadAngel
2014-10-22Fix broken plantlike drawtype.RealBadAngel
2014-10-21Recalculate normals for cached meshes.RealBadAngel
Check if mesh is here before adding to meshcollector. Fix deleting the meshes.
2014-10-19Various uninitialised variable fixesCraig Robbins
sky.cpp: m_bgcolor.getAlpha() was being used before initialised mesh related: m_highlight_mesh_color was being used uninitialised
2014-10-18Add meshnode drawtype.RealBadAngel
2014-10-02Add optional framed glasslike drawtypeBlockMen
2014-09-21Add firelike drawtypeTriBlade9
2014-09-21Split settings into seperate source and header filesShadowNinja
This also cleans up settings a bit
2014-09-18Bugfix: don't highlight air nodes.RealBadAngel
2014-09-17Node highlighting.RealBadAngel
2014-08-21Pass light sources in blue channel of vertex color instead of decoded light ↵RealBadAngel
for all special drawtypes. Plus some style fixes and optimizations.
2014-07-24Dont display interior of glasslike_framed node when its not defined.RealBadAngel
Fixes https://github.com/minetest/minetest/issues/1514
2014-07-24Allow full circle rotation with 2degs step for plantlike drawtype.RealBadAngel
2014-07-22Add rotation for plantlike drawtype.RealBadAngel
2014-07-20Bugfix in makeCuboid - apply rotations to all faces when 1 tile is given.RealBadAngel
2014-07-17Fix texture glitches for plants with visual scale > 1.0 (jungle grass).RealBadAngel
2014-07-17Fix texture hack in fences.RealBadAngel
2014-07-16Fix flipped textures for drawtype "glasslike"sapier
2014-06-29Glasslike_framed drawtype rework.RealBadAngel
2014-04-06Pass pointer to nodedef directly to avoid recalculation in quite often ↵sapier
called function
2013-11-02Fix liquid_rangePilzAdam
* Prevent graphical glitches on old servers * Fix flowing of liquids with viscosity != 1 and range != 8 * Fix range = 0, no flowing nodes will appear
2013-10-14Add support for parameter 'visual_scale' for drawtypes 'signlike' and ↵Sokomine
'torchlike' like used for drawtype 'plantlike'
2013-08-17Diagonal liquid animationKahrl
2013-07-20Add liquid_range to nodedefPilzAdam
2013-07-02Remove texture atlas / AtlasPointer, rename getTextureRaw to getTextureKahrl
2013-05-22Make raillike nodes connect to any other raillike nodes if both are in the ↵Jeija
group connect_to_raillike
2013-04-24Add new drawtype GLASSLIKE_FRAMEDRealBadAngel
2013-03-236d facedirRealBadAngel
2013-03-17Fix new_style_waterPilzAdam
2013-03-14Liquid fine tuningproller
2013-03-11Migrate to STL containers/algorithms.Ilya Zhuravlev