summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-20 12:36:50 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-20 12:36:50 +0200
commitc9224b09e91089d28ac8056dd3707dc99193d298 (patch)
treeb5769b5bec112d554dc349b03fdcb95d4057db44 /source
parentUse leakfinder in debug builds to dump all currently used memory via the "dumpmem" console command. (diff)
downloadcuberite-c9224b09e91089d28ac8056dd3707dc99193d298.tar
cuberite-c9224b09e91089d28ac8056dd3707dc99193d298.tar.gz
cuberite-c9224b09e91089d28ac8056dd3707dc99193d298.tar.bz2
cuberite-c9224b09e91089d28ac8056dd3707dc99193d298.tar.lz
cuberite-c9224b09e91089d28ac8056dd3707dc99193d298.tar.xz
cuberite-c9224b09e91089d28ac8056dd3707dc99193d298.tar.zst
cuberite-c9224b09e91089d28ac8056dd3707dc99193d298.zip
Diffstat (limited to 'source')
-rw-r--r--source/Protocol/Protocol132.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/Protocol/Protocol132.cpp b/source/Protocol/Protocol132.cpp
index d61ca4543..0a2e7d0c9 100644
--- a/source/Protocol/Protocol132.cpp
+++ b/source/Protocol/Protocol132.cpp
@@ -271,6 +271,12 @@ void cProtocol132::SendCollectPickup(const cPickup & a_Pickup, const cPlayer & a
void cProtocol132::SendDestroyEntity(const cEntity & a_Entity)
{
+ if (a_Entity.GetUniqueID() == m_Client->GetPlayer()->GetUniqueID())
+ {
+ // Do not send "destroy self" to the client, the client would crash (FS #254)
+ return;
+ }
+
cCSLock Lock(m_CSPacket);
WriteByte(PACKET_DESTROY_ENTITIES);
WriteByte(1); // entity count