aboutsummaryrefslogtreecommitdiff
path: root/builtin/game/falling.lua
AgeCommit message (Collapse)Author
2018-07-17Builtin: Replace deprecated function calls (#7561)SmallJoker
2018-07-09core.spawn_falling_node: Keep metadata (#7476)SmallJoker
2018-03-31ObjectRef: Add add_velocity() (#3208)you
Allow changing the velocity of objects relatively to their current velocity
2018-02-13Falling.lua: Delete falling node entities on contact with 'ignore'paramat
Prevents falling node entities entering the ignore at a world edge and resting on unloaded nodes 16 nodes below, unreachable, undiggable and still being processed by 'on step' because they don't revert to nodes.
2017-12-14Add callback to preserve node metadata as item metadataashtrayoz
2017-11-14Sounds: Add falling node soundsAuke Kok
Falling nodes should make a sound. This can only be done here, so for simplicity we just call the sound_play() here with the node place sound. We ignore any gain value in the sound spec since a falling node should be loud, so the 1.0 default gain makes sense here.
2017-08-30Remove nodeupdate and nodeupdate_singleRui
2017-06-20Automatic item and node colorization (#5640)Dániel Juhász
* Automatic item and node colorization Now nodes with a palette yield colored item stacks, and colored items place colored nodes by default. The client predicts the colorization. * Backwards compatibility * Use nil * Style fixes * Fix code style * Document changes
2017-03-11Save metainfo for falling nodesVladislav Tsendrovskii
2017-03-04Add minetest.spawn_falling_node(pos) (#5339)zaoqi
* Add minetest.spawn_falling_node(pos) * lua_api.txt: Add minetest.spawn_falling_node(pos) * Update minetest.spawn_falling_node(pos)
2017-02-18Fixes for colorwallmounted and colorfacedir nodesDániel Juhász
Correct node placement prediction for attached colorwallmounted nodes. Correct placement direction for colorfacedir and colorwallmounted nodes. Correct detatch mechanism for attached colorwallmounted nodes.
2017-01-09builtin/.../falling.lua: Avoid crash when hitting unknown nodessfan5
2016-12-21Builtin/../falling.lua: Avoid crash when object pos over limitparamat
If the object pos is over limit, 'add entity' will not add an entity, causing 'obj' to be nil.
2016-11-16Introduce builtin_shared and use it to fix #4778est31
Fixes #4778 which was about the error: ServerError: Lua: Runtime error from mod '' in callback item_OnPlace(): /usr/local/share/minetest/builtin/game/item.lua:278: attempt to call global 'check_attached_node' (a nil value) The issue was a regression of commit 649448a2a91fbf3e944b2f2e739f4e2292af1df0 "Rename nodeupdate and nodeupdate_single and make them part of the official API"
2016-11-14Rename nodeupdate and nodeupdate_single and make them part of the official APIest31
Now, the renamed forms of nodeupdate and nodeupdate_single are part of the official API. As nodeupdate has been used by Minetest Game and in mods despite of not being part of the official API, we ease the transition by still supporting it for the 0.4.15 release. After the release, the two functions can be removed. The removal will not violate the stability promise, as that promise only includes the official and documented API. Also, make some formerly global functions local. They most likely haven't been used by mods, therefore they won't get stubs with deprecation warnings, hard erroring directly.
2016-11-07Builtin/../falling: Fix bugs caused by 'ignore' nodesparamat
Original commit by t4im, rebased and developed by paramat. Fix CONTENT_IGNORE being replaced by falling nodes or causing large areas of sand to collapse into itself. Format some conditional code for clarity. Add and clarify some comments.
2016-10-14Builtin/../falling.lua: Code optimisationtenplus1
2016-10-03Builtin/falling: Add fallback vector in case of nil 'wallmounted to dir'paramat
The fallback vector is in case 'wallmounted to dir' is nil due to voxelmanip placing a wallmounted node without resetting a pre-existing param2 value that is out-of-range for wallmounted. The fallback vector corresponds to param2 = 0.
2016-05-17Add on_punchnode callbackWayward One
2016-04-20falling: walk 4 additional diagonally down directions.Auke Kok
This seems very little cost and matches the old behavior more closely. This will cause some more falling nodes to get added to falling clusters. With the efficiency of the algorithm, this really doesn't do much damage.
2016-04-11Convert nodeupdate to non-recursiveAuke Kok
This took me a while to figure out. We no longer visit all 9 block around and with the touched node, but instead visit adjacent plus self. We then walk -non- recursively through all neigbors and if they cause a nodeupdate, we just keep walking until it ends. On the way back we prune the tail. I've tested this with 8000+ sand nodes. Video result is here: https://youtu.be/liKKgLefhFQ Took ~ 10 seconds to process and return to normal.
2016-03-29stop falling.lua errortenplus1
2016-03-27 15:47:01: ERROR[Main]: ServerError: Lua: Runtime error from mod '*builtin*' in callback luaentity_Step(): Node name is not set or is not a string! 2016-03-27 15:47:01: ERROR[Main]: stack traceback: 2016-03-27 15:47:01: ERROR[Main]: [C]: in function 'add_node' 2016-03-27 15:47:01: ERROR[Main]: /usr/share/minetest/builtin/game/falling.lua:96: in function </usr/share/minetest/builtin/game/falling.lua:43>
2016-03-25Falling: Set acceleration on step againRui
Commit 65c09a96f41705bb8e75fc5ff4276342be91ed11 "Set acceleration only once in falling node" has made the acceleration being set only once. But this has introduced a regression. Fix #3884.
2016-03-19Builtin/game/falling: Re-add comma removed by recent commitparamat
2016-03-19Set acceleration only once in falling nodeRui914
2015-09-01Minor tweaks __builtin:falling_nodeRui
2014-11-26Fix some undeclared global variablesCraig Davison
2014-09-28Use round if falling node is misplacedSmallJoker
Fixes: http://i.imgur.com/arAWw1i.png (middle-right)
2014-08-22Remove buildable_to nodes without dropping item when replaced by a falling nodeCasimir
2014-06-08Allow custom liquids to have dropssfan5
2014-05-08Use "core" namespace internallyShadowNinja
2014-05-07Organize builtin into subdirectoriesShadowNinja