summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol18x.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-05-07 16:14:56 +0200
committerMattes D <github@xoft.cz>2015-05-07 16:14:56 +0200
commit4888f671d15c47cf79b289a72fb5068cc6a6e35b (patch)
tree462ab2388a09dada48478104553fb9f6fedcb358 /src/Protocol/Protocol18x.cpp
parentMerge pull request #1953 from mc-server/bearbin-fadwp (diff)
parentAdded support for additional data in the ParticleEffect Packet (diff)
downloadcuberite-4888f671d15c47cf79b289a72fb5068cc6a6e35b.tar
cuberite-4888f671d15c47cf79b289a72fb5068cc6a6e35b.tar.gz
cuberite-4888f671d15c47cf79b289a72fb5068cc6a6e35b.tar.bz2
cuberite-4888f671d15c47cf79b289a72fb5068cc6a6e35b.tar.lz
cuberite-4888f671d15c47cf79b289a72fb5068cc6a6e35b.tar.xz
cuberite-4888f671d15c47cf79b289a72fb5068cc6a6e35b.tar.zst
cuberite-4888f671d15c47cf79b289a72fb5068cc6a6e35b.zip
Diffstat (limited to 'src/Protocol/Protocol18x.cpp')
-rw-r--r--src/Protocol/Protocol18x.cpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/Protocol/Protocol18x.cpp b/src/Protocol/Protocol18x.cpp
index 4429ca683..628d8f528 100644
--- a/src/Protocol/Protocol18x.cpp
+++ b/src/Protocol/Protocol18x.cpp
@@ -802,6 +802,50 @@ void cProtocol180::SendParticleEffect(const AString & a_ParticleName, float a_Sr
+void cProtocol180::SendParticleEffect(const AString & a_ParticleName, Vector3f a_Src, Vector3f a_Offset, float a_ParticleData, int a_ParticleAmount, std::array<int, 2> a_Data)
+{
+ ASSERT(m_State == 3); // In game mode?
+ int ParticleID = GetParticleID(a_ParticleName);
+
+ cPacketizer Pkt(*this, 0x2A);
+ Pkt.WriteBEInt32(ParticleID);
+ Pkt.WriteBool(false);
+ Pkt.WriteBEFloat(a_Src.x);
+ Pkt.WriteBEFloat(a_Src.y);
+ Pkt.WriteBEFloat(a_Src.z);
+ Pkt.WriteBEFloat(a_Offset.x);
+ Pkt.WriteBEFloat(a_Offset.y);
+ Pkt.WriteBEFloat(a_Offset.z);
+ Pkt.WriteBEFloat(a_ParticleData);
+ Pkt.WriteBEInt32(a_ParticleAmount);
+ switch (ParticleID)
+ {
+ // iconcrack
+ case 36:
+ {
+ Pkt.WriteVarInt32(static_cast<UInt32>(a_Data[0]));
+ Pkt.WriteVarInt32(static_cast<UInt32>(a_Data[1]));
+ break;
+ }
+ // blockcrack
+ // blockdust
+ case 37:
+ case 38:
+ {
+ Pkt.WriteVarInt32(static_cast<UInt32>(a_Data[0]));
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+}
+
+
+
+
+
void cProtocol180::SendPlayerListAddPlayer(const cPlayer & a_Player)
{
ASSERT(m_State == 3); // In game mode?