1
0

Players can switch worlds on the fly with the command /gotoworld [worldName]. This uses the function cPlayer::MoveToWorld()

Changed isValidItem to IsValidItem in Core.lua

git-svn-id: http://mc-server.googlecode.com/svn/trunk@126 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
faketruth
2011-12-26 21:54:08 +00:00
parent 9f77572fb0
commit eb942797b8
13 changed files with 222 additions and 144 deletions

View File

@@ -375,6 +375,20 @@ void cClientHandle::StreamChunksSmart( cChunk** a_Chunks, unsigned int a_NumChun
}
}
// This removes the client from all chunks. Used when switching worlds
void cClientHandle::RemoveFromAllChunks()
{
for(int i = 0; i < VIEWDISTANCE*VIEWDISTANCE; i++)
{
if( m_LoadedChunks[i] )
{
m_LoadedChunks[i]->RemoveClient( this );
m_LoadedChunks[i]->AsyncUnload( this );
m_LoadedChunks[i] = 0;
}
}
}
void cClientHandle::AddPacket(cPacket * a_Packet)
{
m_pState->CriticalSection.Lock();