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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user