From 0b24efeb005e293a026f2ac8666020cea8316578 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Wed, 14 Mar 2012 20:56:09 +0000 Subject: Split chunk data into separate arrays; decoupled most sources from cChunk.h dependency git-svn-id: http://mc-server.googlecode.com/svn/trunk@411 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cClientHandle.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/cClientHandle.cpp') diff --git a/source/cClientHandle.cpp b/source/cClientHandle.cpp index 07be3d4a7..d7b1aa55c 100644 --- a/source/cClientHandle.cpp +++ b/source/cClientHandle.cpp @@ -349,8 +349,8 @@ void cClientHandle::StreamChunks(void) ASSERT(m_Player != NULL); - int ChunkPosX = FAST_FLOOR_DIV(m_Player->GetPosX(), cChunk::c_ChunkWidth); - int ChunkPosZ = FAST_FLOOR_DIV(m_Player->GetPosZ(), cChunk::c_ChunkWidth); + int ChunkPosX = FAST_FLOOR_DIV(m_Player->GetPosX(), cChunkDef::Width); + int ChunkPosZ = FAST_FLOOR_DIV(m_Player->GetPosZ(), cChunkDef::Width); if ((ChunkPosX == m_LastStreamedChunkX) && (ChunkPosZ == m_LastStreamedChunkZ)) { // Already streamed for this position @@ -1721,8 +1721,8 @@ void cClientHandle::Send(const cPacket & a_Packet, ENUM_PRIORITY a_Priority /* = int ChunkX = ((cPacket_MapChunk &)a_Packet).m_PosX; int ChunkZ = ((cPacket_MapChunk &)a_Packet).m_PosZ; #else - int ChunkX = ((cPacket_MapChunk &)a_Packet).m_PosX / cChunk::c_ChunkWidth; - int ChunkZ = ((cPacket_MapChunk &)a_Packet).m_PosZ / cChunk::c_ChunkWidth; + int ChunkX = ((cPacket_MapChunk &)a_Packet).m_PosX / cChunkDef::Width; + int ChunkZ = ((cPacket_MapChunk &)a_Packet).m_PosZ / cChunkDef::Width; #endif bool Found = false; cCSLock Lock(m_CSChunkLists); -- cgit v1.2.3