mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
cleaned map stuff
This commit is contained in:
parent
a80025c352
commit
cb130d9158
7 changed files with 67 additions and 285 deletions
|
@ -25,6 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "main.h"
|
||||
#include <sstream>
|
||||
#include "porting.h"
|
||||
#include "mapsector.h"
|
||||
|
||||
void * MeshUpdateThread::Thread()
|
||||
{
|
||||
|
@ -715,15 +716,16 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
|
|||
//TimeTaker timer("MapBlock deSerialize");
|
||||
// 0ms
|
||||
|
||||
try{
|
||||
block = sector->getBlockNoCreate(p.Y);
|
||||
block = sector->getBlockNoCreateNoEx(p.Y);
|
||||
if(block)
|
||||
{
|
||||
/*
|
||||
Update an existing block
|
||||
*/
|
||||
//dstream<<"Updating"<<std::endl;
|
||||
block->deSerialize(istr, ser_version);
|
||||
}
|
||||
catch(InvalidPositionException &e)
|
||||
else
|
||||
{
|
||||
/*
|
||||
Create a new block
|
||||
|
@ -952,6 +954,8 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
|
|||
}
|
||||
else if(command == TOCLIENT_SECTORMETA)
|
||||
{
|
||||
dstream<<"Client received DEPRECATED TOCLIENT_SECTORMETA"<<std::endl;
|
||||
#if 0
|
||||
/*
|
||||
[0] u16 command
|
||||
[2] u8 sector count
|
||||
|
@ -987,6 +991,7 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
|
|||
((ClientMap&)m_env.getMap()).deSerializeSector(pos, is);
|
||||
}
|
||||
} //envlock
|
||||
#endif
|
||||
}
|
||||
else if(command == TOCLIENT_INVENTORY)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue