aboutsummaryrefslogtreecommitdiff
path: root/src/collision.cpp
Commit message (Collapse)AuthorAge
* Allow nodes to specify which sides to connect to.Auke Kok2016-03-12
| | | | | | | | | | | | | | | | 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.
* 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
* Revert "Fix jumping at node edge"nerzhul2016-03-01
| | | | | | This reverts commit 60dc01dc258db842e229351b871d0989e3e7d62c. This fixes issue #3773
* Little collision.cpp cleanupsLoic Blot2016-02-20
|
* Fix jumping at node edgegregorycu2016-02-19
|
* Don't pass non-const references to collision methodsest312016-01-29
| | | | | Non const references cause a lot of confusion with behaviour of code, and are disallowed by minetest style guide.
* Make collisionMoveSimple time overflow message written to log/show up at max ↵Sapier2015-12-29
| | | | once per step
* Fix jittering sounds on entities (fixes #2974)BlockMen2015-10-26
|
* Use warningstream for log messages with WARNINGShadowNinja2015-10-14
| | | | Remove DTIME macro and its uses, too
* Fix falling through nodes on world load (fixes #2784)Christof Kaufmann2015-09-26
| | | | | | | | | | | On world load the collision code can not see node boxes, since the nodes have not been loaded. Thus it collided only at the next full node. However, standing on a slab on world load leaded to sinking into it until the world finished loading. Then one maybe fell further, if the node below was not walkable. Now, with this commit, when no node around the player has been loaded it simply does not move the player.
* Change i++ to ++iDavid Jones2015-08-25
|
* Remove profiler.h include where it's not needed. Remove some unreachable and ↵Loic Blot2015-07-21
| | | | very old code
* Use std::vector instead of std::set for Environment::getObjectsInsideRadiusLoic Blot2015-04-16
| | | | | We are only iterating sequentially, we don't need a set here Also use a vector reference instead of a copy
* 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
* collisionMoveSimple: use std::vector instead of std::list, this improve the ↵Loic Blot2015-03-05
| | | | performances
* Remove most exceptions from getNode() (and variants)Craig Robbins2014-11-14
|
* Custom collision boxes node property.RealBadAngel2014-10-19
|
* Add an option to disable object <-> object collision for Lua entitiesPilzAdam2013-07-20
|
* Disable collision fix, its broke unit testsproller2013-07-01
|
* Fix sand, gravel falling stuckproller2013-06-30
|
* Fix nearly all warningskwolekr2013-05-19
|
* fix objects colliding with its own collision boxessapier2013-04-09
|
* Limit speed in collisionMoveResult for avoiding hangsEsteban I. Ruiz Moreno2013-04-03
|
* Closed add object <-> object collision handlingsapier2013-03-28
|
* Update Copyright YearsSfan52013-02-24
|
* Change Minetest-c55 to MinetestPilzAdam2013-02-24
|
* add limit for steps to avoid runaway memory consumption by collision handlingsapier2013-01-16
|
* Add bouncy node groupPerttu Ahola2012-09-01
|
* Custom boxy nodes (stairs, slabs) and collision changesKahrl2012-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
* Fix collision code getting stuck if speed is 0Perttu Ahola2012-04-07
|
* Improve luaentity sprite functionality (and add some random stuff)Perttu Ahola2011-11-29
|
* Relatively snappy object-ground collision detectionPerttu Ahola2011-11-29
|
* GameDef compilesPerttu Ahola2011-11-29
|
* Move ContentFeatures to mapnode_contentfeatures.{h,cpp} and clean stuffPerttu Ahola2011-11-29
|
* extended content-type rangePerttu Ahola2011-07-23
|
* reorganized a lot of stuff and modified mapgen and objects slightly while ↵Perttu Ahola2011-06-26
| | | | doing it
* Some work-in-progress in hp and mobs and a frightening amount of random fixes.Perttu Ahola2011-04-21
|
* implemented rats in new system to verify that it worksPerttu Ahola2011-04-10