summaryrefslogtreecommitdiff
path: root/src/particles.cpp
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2020-05-22 14:17:03 +0200
committersfan5 <sfan5@live.de>2020-05-23 22:52:21 +0200
commit9d6e7e48d6fb1daff8fedcb2f111164bef61f1e7 (patch)
treeb4526e1feb6a2423b967ba120afd5da37d813d41 /src/particles.cpp
parent15ba75e4cf1d1b8ceaa9d8ce33dcfdd7dbe80741 (diff)
downloadminetest-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.cpp10
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);
}