summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_8.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-09-12 20:57:44 +0200
committerGitHub <noreply@github.com>2020-09-12 20:57:44 +0200
commit93adbdce9a769b42baeb70f9ead5c7c6a35834b5 (patch)
treee0116770113a78af0d2d1c4d44a3878f551f0703 /src/Protocol/Protocol_1_8.cpp
parentfixed missing include for FreeBSD. (#4852) (diff)
downloadcuberite-93adbdce9a769b42baeb70f9ead5c7c6a35834b5.tar
cuberite-93adbdce9a769b42baeb70f9ead5c7c6a35834b5.tar.gz
cuberite-93adbdce9a769b42baeb70f9ead5c7c6a35834b5.tar.bz2
cuberite-93adbdce9a769b42baeb70f9ead5c7c6a35834b5.tar.lz
cuberite-93adbdce9a769b42baeb70f9ead5c7c6a35834b5.tar.xz
cuberite-93adbdce9a769b42baeb70f9ead5c7c6a35834b5.tar.zst
cuberite-93adbdce9a769b42baeb70f9ead5c7c6a35834b5.zip
Diffstat (limited to '')
-rw-r--r--src/Protocol/Protocol_1_8.cpp24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/Protocol/Protocol_1_8.cpp b/src/Protocol/Protocol_1_8.cpp
index 39c20b6cf..e5ba82111 100644
--- a/src/Protocol/Protocol_1_8.cpp
+++ b/src/Protocol/Protocol_1_8.cpp
@@ -620,25 +620,19 @@ void cProtocol_1_8_0::SendExperienceOrb(const cExpOrb & a_ExpOrb)
-void cProtocol_1_8_0::SendExplosion(double a_BlockX, double a_BlockY, double a_BlockZ, float a_Radius, const cVector3iArray & a_BlocksAffected, const Vector3d & a_PlayerMotion)
+void cProtocol_1_8_0::SendExplosion(const Vector3f a_Position, const float a_Power)
{
ASSERT(m_State == 3); // In game mode?
cPacketizer Pkt(*this, pktExplosion);
- Pkt.WriteBEFloat(static_cast<float>(a_BlockX));
- Pkt.WriteBEFloat(static_cast<float>(a_BlockY));
- Pkt.WriteBEFloat(static_cast<float>(a_BlockZ));
- Pkt.WriteBEFloat(static_cast<float>(a_Radius));
- Pkt.WriteBEUInt32(static_cast<UInt32>(a_BlocksAffected.size()));
- for (cVector3iArray::const_iterator itr = a_BlocksAffected.begin(), end = a_BlocksAffected.end(); itr != end; ++itr)
- {
- Pkt.WriteBEInt8(static_cast<Int8>(itr->x));
- Pkt.WriteBEInt8(static_cast<Int8>(itr->y));
- Pkt.WriteBEInt8(static_cast<Int8>(itr->z));
- } // for itr - a_BlockAffected[]
- Pkt.WriteBEFloat(static_cast<float>(a_PlayerMotion.x));
- Pkt.WriteBEFloat(static_cast<float>(a_PlayerMotion.y));
- Pkt.WriteBEFloat(static_cast<float>(a_PlayerMotion.z));
+ Pkt.WriteBEFloat(a_Position.x);
+ Pkt.WriteBEFloat(a_Position.y);
+ Pkt.WriteBEFloat(a_Position.z);
+ Pkt.WriteBEFloat(a_Power);
+ Pkt.WriteBEUInt32(0);
+ Pkt.WriteBEFloat(0);
+ Pkt.WriteBEFloat(0);
+ Pkt.WriteBEFloat(0);
}