diff options
author | Jeija <norrepli@gmail.com> | 2013-01-23 18:32:02 +0100 |
---|---|---|
committer | PilzAdam <pilzadam@minetest.net> | 2013-03-23 23:16:29 +0100 |
commit | e1ff5b13619666e5b987ecf4faaf294400ffd979 (patch) | |
tree | 13885f396367c79625a72a4445fe6e81819d92c5 /src/clientserver.h | |
parent | ab57fdac44bae20e43500b3edd39bac9a0f563c5 (diff) | |
download | hax-minetest-server-e1ff5b13619666e5b987ecf4faaf294400ffd979.tar.gz hax-minetest-server-e1ff5b13619666e5b987ecf4faaf294400ffd979.zip |
Allow spawning particles from the server, from lua
Spawn single particles or make use of ParticleSpawner for many randomly spawned particles.
Accessible in Lua using minetest.spawn_particle and minetest.add_particlespawner.
Increase Protocol Version to 17.
Conflicts:
src/clientserver.h
Diffstat (limited to 'src/clientserver.h')
-rw-r--r-- | src/clientserver.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/clientserver.h b/src/clientserver.h index 6d830b92b..535fc04d8 100644 --- a/src/clientserver.h +++ b/src/clientserver.h @@ -82,6 +82,9 @@ SharedBuffer<u8> makePacket_TOCLIENT_TIME_OF_DAY(u16 time, float time_speed); PROTOCOL_VERSION 17: Serialization format change: include backface_culling flag in TileDef Added rightclickable field in nodedef + TOCLIENT_SPAWN_PARTICLE + TOCLIENT_ADD_PARTICLESPAWNER + TOCLIENT_DELETE_PARTICLESPAWNER */ #define LATEST_PROTOCOL_VERSION 17 @@ -359,6 +362,7 @@ enum ToClientCommand u8[len] name [2] serialized inventory */ + TOCLIENT_SHOW_FORMSPEC = 0x44, /* [0] u16 command @@ -384,6 +388,46 @@ enum ToClientCommand f1000 movement_liquid_sink f1000 movement_gravity */ + + TOCLIENT_SPAWN_PARTICLE = 0x46, + /* + u16 command + v3f1000 pos + v3f1000 velocity + v3f1000 acceleration + f1000 expirationtime + f1000 size + u8 bool collisiondetection + u32 len + u8[len] texture + */ + + TOCLIENT_ADD_PARTICLESPAWNER = 0x47, + /* + u16 command + u16 amount + f1000 spawntime + v3f1000 minpos + v3f1000 maxpos + v3f1000 minvel + v3f1000 maxvel + v3f1000 minacc + v3f1000 maxacc + f1000 minexptime + f1000 maxexptime + f1000 minsize + f1000 maxsize + u8 bool collisiondetection + u32 len + u8[len] texture + u32 id + */ + + TOCLIENT_DELETE_PARTICLESPAWNER = 0x48, + /* + u16 command + u32 id + */ }; enum ToServerCommand |