minetest/src/script
Auke Kok d499ec4838 Particles: Add option to remove particles on collision
Adds the particle option `collision_removal = bool`

Some particles are hard to use right now since they either go through
solid blocks (without collision detection), and with collision
detection enabled they (e.g. raindrops) would just stop dead on the
floor and sit there until they expire, or worse, scrape along a wall
or ceiling.

We can solve the problem by adding a boolean flag that tells the
particle to be removed if it ever collides with something. This will
make it easier to add rain that doesn't fall through your roof or stick
on the top of it. Or clouds and smoke that don't go through trees.

Particles that collide with this flag are marked expired
unconditionally, causing them to be treated like normal expired
particles and cleaned up normally.

Documentation is adjusted accordingly.

An added bonus of this patch is that particles can potentially collide
many times with nodes, and this reduces the amount of collisions to 1
(max), which may end up reducing particle load on the client.
2016-05-28 00:08:23 -04:00
..
common Allow nodes to specify which sides to connect to. 2016-03-12 12:08:17 -05:00
cpp_api Nodebox: Allow nodeboxes to "connect" 2016-03-12 12:08:17 -05:00
lua_api Particles: Add option to remove particles on collision 2016-05-28 00:08:23 -04:00
CMakeLists.txt Clean up and tweak build system 2015-03-27 15:00:48 -04:00
scripting_game.cpp Add Lua interface to HTTPFetchRequest 2016-02-22 15:39:41 +01:00
scripting_game.h Improve Script CPP API diagnostics 2015-08-05 21:13:03 -04:00
scripting_mainmenu.cpp Push error handler afresh each time lua_pcall is used 2015-08-27 01:56:06 +02:00
scripting_mainmenu.h Fix code style of async API 2014-04-27 16:15:53 -04:00