diff options
author | sfan5 <sfan5@live.de> | 2020-05-22 14:17:03 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2020-05-23 22:52:21 +0200 |
commit | 9d6e7e48d6fb1daff8fedcb2f111164bef61f1e7 (patch) | |
tree | b4526e1feb6a2423b967ba120afd5da37d813d41 /src/particles.cpp | |
parent | 15ba75e4cf1d1b8ceaa9d8ce33dcfdd7dbe80741 (diff) | |
download | minetest-9d6e7e48d6fb1daff8fedcb2f111164bef61f1e7.tar.gz minetest-9d6e7e48d6fb1daff8fedcb2f111164bef61f1e7.tar.bz2 minetest-9d6e7e48d6fb1daff8fedcb2f111164bef61f1e7.zip |
Implement spawning particles with node texture appearance
Diffstat (limited to 'src/particles.cpp')
-rw-r--r-- | src/particles.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/particles.cpp b/src/particles.cpp index 711d189f6..fd81238dc 100644 --- a/src/particles.cpp +++ b/src/particles.cpp @@ -34,6 +34,9 @@ void ParticleParameters::serialize(std::ostream &os, u16 protocol_ver) const animation.serialize(os, 6); /* NOT the protocol ver */ writeU8(os, glow); writeU8(os, object_collision); + writeU16(os, node.param0); + writeU8(os, node.param2); + writeU8(os, node_tile); } void ParticleParameters::deSerialize(std::istream &is, u16 protocol_ver) @@ -50,4 +53,11 @@ void ParticleParameters::deSerialize(std::istream &is, u16 protocol_ver) animation.deSerialize(is, 6); /* NOT the protocol ver */ glow = readU8(is); object_collision = readU8(is); + // This is kinda awful + u16 tmp_param0 = readU16(is); + if (is.eof()) + return; + node.param0 = tmp_param0; + node.param2 = readU8(is); + node_tile = readU8(is); } |