mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
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
This commit is contained in:
parent
ab57fdac44
commit
e1ff5b1361
13 changed files with 1060 additions and 56 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue