From 01b24d73eab6b0e708063d82f01ea9bb9296550c Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 3 Mar 2013 19:05:11 +0000 Subject: Player can sit in minecarts (but not move them yet) git-svn-id: http://mc-server.googlecode.com/svn/trunk@1249 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Chunk.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'source/Chunk.cpp') diff --git a/source/Chunk.cpp b/source/Chunk.cpp index cfe6ad22d..f809892f4 100644 --- a/source/Chunk.cpp +++ b/source/Chunk.cpp @@ -1900,9 +1900,9 @@ cChunk * cChunk::GetRelNeighborChunk(int a_RelX, int a_RelZ) // For requests crossing both X and Z, the X-first way has been already tried } return NULL; - } - else if (a_RelZ >= cChunkDef::Width) - { + } + else if (a_RelZ >= cChunkDef::Width) + { if (m_NeighborZP != NULL) { return m_NeighborZP->GetRelNeighborChunk(a_RelX, a_RelZ - cChunkDef::Width); @@ -1918,6 +1918,18 @@ cChunk * cChunk::GetRelNeighborChunk(int a_RelX, int a_RelZ) +void cChunk::BroadcastAttachEntity(const cEntity & a_Entity, const cEntity * a_Vehicle) +{ + for (cClientHandleList::const_iterator itr = m_LoadedByClient.begin(); itr != m_LoadedByClient.end(); ++itr ) + { + (*itr)->SendAttachEntity(a_Entity, a_Vehicle); + } // for itr - LoadedByClient[] +} + + + + + void cChunk::BroadcastPlayerAnimation(const cPlayer & a_Player, char a_Animation, const cClientHandle * a_Exclude) { for (cClientHandleList::const_iterator itr = m_LoadedByClient.begin(); itr != m_LoadedByClient.end(); ++itr ) -- cgit v1.2.3