diff options
author | Lexi Hale <5723574+velartrill@users.noreply.github.com> | 2022-07-13 11:57:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-13 11:57:12 +0200 |
commit | 20bd6bdb685af11548c35d3a48e5aa33f4222397 (patch) | |
tree | 6f60bad900cdb0ea28606bfe3f860b4948eeb277 /src/network/networkprotocol.h | |
parent | 8724fe6e3fc2b6c0b78123f1f95fd8c6c6817dd5 (diff) | |
download | minetest-20bd6bdb685af11548c35d3a48e5aa33f4222397.tar.gz minetest-20bd6bdb685af11548c35d3a48e5aa33f4222397.tar.bz2 minetest-20bd6bdb685af11548c35d3a48e5aa33f4222397.zip |
Animated particlespawners and more (#11545)
Co-authored-by: Lars Mueller <appgurulars@gmx.de>
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: Dmitry Kostenko <codeforsmile@gmail.com>
Diffstat (limited to 'src/network/networkprotocol.h')
-rw-r--r-- | src/network/networkprotocol.h | 95 |
1 files changed, 79 insertions, 16 deletions
diff --git a/src/network/networkprotocol.h b/src/network/networkprotocol.h index 33e49afa4..e3fd32866 100644 --- a/src/network/networkprotocol.h +++ b/src/network/networkprotocol.h @@ -207,6 +207,7 @@ with this program; if not, write to the Free Software Foundation, Inc., Minimap modes PROTOCOL VERSION 40: TOCLIENT_MEDIA_PUSH changed, TOSERVER_HAVE_MEDIA added + Added new particlespawner parameters (5.6.0) */ #define LATEST_PROTOCOL_VERSION 40 @@ -511,11 +512,12 @@ enum ToClientCommand TOCLIENT_SPAWN_PARTICLE = 0x46, /* - v3f1000 pos - v3f1000 velocity - v3f1000 acceleration - f1000 expirationtime - f1000 size + -- struct range<T> { T min, T max, f32 bias }; + v3f pos + v3f velocity + v3f acceleration + f32 expirationtime + f32 size u8 bool collisiondetection u32 len u8[len] texture @@ -524,22 +526,26 @@ enum ToClientCommand TileAnimation animation u8 glow u8 object_collision + v3f drag + range<v3f> bounce */ TOCLIENT_ADD_PARTICLESPAWNER = 0x47, /* + -- struct range<T> { T min, T max, f32 bias }; + -- struct tween<T> { T start, T end }; u16 amount - f1000 spawntime - v3f1000 minpos - v3f1000 maxpos - v3f1000 minvel - v3f1000 maxvel - v3f1000 minacc - v3f1000 maxacc - f1000 minexptime - f1000 maxexptime - f1000 minsize - f1000 maxsize + f32 spawntime + v3f minpos + v3f maxpos + v3f minvel + v3f maxvel + v3f minacc + v3f maxacc + f32 minexptime + f32 maxexptime + f32 minsize + f32 maxsize u8 bool collisiondetection u32 len u8[len] texture @@ -549,6 +555,63 @@ enum ToClientCommand TileAnimation animation u8 glow u8 object_collision + + f32 pos_start_bias + f32 vel_start_bias + f32 acc_start_bias + f32 exptime_start_bias + f32 size_start_bias + + range<v3f> pos_end + -- i.e v3f pos_end_min + -- v3f pos_end_max + -- f32 pos_end_bias + range<v3f> vel_end + range<v3f> acc_end + + tween<range<v3f>> drag + -- i.e. v3f drag_start_min + -- v3f drag_start_max + -- f32 drag_start_bias + -- v3f drag_end_min + -- v3f drag_end_max + -- f32 drag_end_bias + tween<range<v3f>> jitter + tween<range<f32>> bounce + + u8 attraction_kind + none = 0 + point = 1 + line = 2 + plane = 3 + + if attraction_kind > none { + tween<range<f32>> attract_strength + tween<v3f> attractor_origin + u16 attractor_origin_attachment_object_id + u8 spawner_flags + bit 1: attractor_kill (particles dies on contact) + if attraction_mode > point { + tween<v3f> attractor_angle + u16 attractor_origin_attachment_object_id + } + } + + tween<range<v3f>> radius + tween<range<v3f>> drag + + u16 texpool_sz + texpool_sz.times { + u8 flags + -- bit 0: animated + -- other bits free & ignored as of proto v40 + tween<f32> alpha + tween<v2f> scale + if flags.animated { + TileAnimation animation + } + } + */ TOCLIENT_DELETE_PARTICLESPAWNER_LEGACY = 0x48, // Obsolete |