From e92b9e7ecbdf2918aab59d4eeb7bb5966430b264 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Fri, 24 Aug 2012 07:58:26 +0000 Subject: Monster classes don't use cPackets. Chat messages are sent / broadcast without cPackets. BlockEntities don't use cPackets. git-svn-id: http://mc-server.googlecode.com/svn/trunk@783 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/ChunkSender.h | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'source/ChunkSender.h') diff --git a/source/ChunkSender.h b/source/ChunkSender.h index 08d97cfca..b1b276a2e 100644 --- a/source/ChunkSender.h +++ b/source/ChunkSender.h @@ -27,7 +27,6 @@ Note that it may be called by world's BroadcastToChunk() if the client is still #include "cIsThread.h" #include "ChunkDef.h" -#include "packets/cPacket.h" @@ -116,9 +115,25 @@ protected: (a_Other.m_Client == m_Client) ); } - }; + } ; typedef std::list sSendChunkList; + struct sBlockCoord + { + int m_BlockX; + int m_BlockY; + int m_BlockZ; + + sBlockCoord(int a_BlockX, int a_BlockY, int a_BlockZ) : + m_BlockX(a_BlockX), + m_BlockY(a_BlockY), + m_BlockZ(a_BlockZ) + { + } + } ; + + typedef std::vector sBlockCoords; + cWorld * m_World; cCriticalSection m_CS; @@ -133,7 +148,8 @@ protected: // Data about the chunk that is being sent: // NOTE that m_BlockData[] is inherited from the cChunkDataCollector unsigned char m_BiomeMap[cChunkDef::Width * cChunkDef::Width]; - PacketList m_Packets; // Accumulator for the entity-packets to send + sBlockCoords m_BlockEntities; // Coords of the block entities to send + // TODO: sEntityIDs m_Entities; // Entity-IDs of the entities to send // cIsThread override: virtual void Execute(void) override; -- cgit v1.2.3