1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-26 18:21:04 +00:00
luanti/src/network
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
..
clientopcodes.cpp Make early protocol auth mechanism generic, and add SRP 2015-05-11 18:40:27 +02:00
clientopcodes.h [Patch 2/4] Network rework: packet writing, sending and cleanups 2015-02-16 11:00:55 +01:00
clientpackethandler.cpp 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
connection.cpp Tolerate packet reordering in the early init process 2016-05-22 15:56:54 +02:00
connection.h Tolerate packet reordering in the early init process 2016-05-22 15:56:54 +02:00
networkpacket.cpp Fix for commit 87dcee6 It uses the wrong variable and only covers some use cases. This change covers all use cases. 2016-01-04 07:50:39 +01:00
networkpacket.h Fix critical vulnerabilities and bugs with NetworkPacket 2015-08-06 00:10:57 -04:00
networkprotocol.h Particles: Add option to remove particles on collision 2016-05-28 00:08:23 -04:00
serveropcodes.cpp Finalize init packets and enable protocol v25 2015-05-16 21:17:28 +02:00
serveropcodes.h [Patch 2/4] Network rework: packet writing, sending and cleanups 2015-02-16 11:00:55 +01:00
serverpackethandler.cpp Fix small formatting issue in SRP debug output 2016-03-29 19:59:14 +02:00