summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorkhonkhortisan <khonkhortisan@gmail.com>2013-04-22 11:35:10 -0700
committerShadowNinja <shadowninja@minetest.net>2014-01-13 17:34:56 -0500
commit2b1eff772524fca8249fd64028e5cbfeabc127a0 (patch)
treef7d1a231de13db304a2ea1fb945e41b08b38f0f1 /src/client.cpp
parenta4c5f10ecf4fd49cfbf73580b00c0b4f12ee40cf (diff)
downloadminetest-2b1eff772524fca8249fd64028e5cbfeabc127a0.tar.gz
minetest-2b1eff772524fca8249fd64028e5cbfeabc127a0.tar.bz2
minetest-2b1eff772524fca8249fd64028e5cbfeabc127a0.zip
Allow vertical axis particle rotation constraint
Use tables for adding particles, deprecate former way. separate particles(pawner) definition, add default values, work with no arguments
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 1c7ecf3f3..b2709b6f0 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -1844,6 +1844,10 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
float size = readF1000(is);
bool collisiondetection = readU8(is);
std::string texture = deSerializeLongString(is);
+ bool vertical = false;
+ try {
+ vertical = readU8(is);
+ } catch (...) {}
ClientEvent event;
event.type = CE_SPAWN_PARTICLE;
@@ -1855,6 +1859,7 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
event.spawn_particle.size = size;
event.spawn_particle.collisiondetection =
collisiondetection;
+ event.spawn_particle.vertical = vertical;
event.spawn_particle.texture = new std::string(texture);
m_client_event_queue.push_back(event);
@@ -1879,6 +1884,10 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
bool collisiondetection = readU8(is);
std::string texture = deSerializeLongString(is);
u32 id = readU32(is);
+ bool vertical = false;
+ try {
+ vertical = readU8(is);
+ } catch (...) {}
ClientEvent event;
event.type = CE_ADD_PARTICLESPAWNER;
@@ -1897,6 +1906,7 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
event.add_particlespawner.minsize = minsize;
event.add_particlespawner.maxsize = maxsize;
event.add_particlespawner.collisiondetection = collisiondetection;
+ event.add_particlespawner.vertical = vertical;
event.add_particlespawner.texture = new std::string(texture);
event.add_particlespawner.id = id;