1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00
This commit is contained in:
Perttu Ahola 2011-10-15 02:28:57 +03:00
parent 080002f8ed
commit 43a28f04fa
29 changed files with 1720 additions and 2889 deletions

View file

@ -36,7 +36,6 @@ MapBlock::MapBlock(Map *parent, v3s16 pos, bool dummy):
m_lighting_expired(true),
m_day_night_differs(false),
m_generated(false),
m_objects(this),
m_timestamp(BLOCK_TIMESTAMP_UNDEFINED),
m_usage_timer(0)
{
@ -434,18 +433,6 @@ void MapBlock::copyFrom(VoxelManipulator &dst)
getPosRelative(), data_size);
}
void MapBlock::stepObjects(float dtime, bool server, u32 daynight_ratio)
{
/*
Step objects
*/
m_objects.step(dtime, server, daynight_ratio);
//setChangedFlag();
raiseModified(MOD_STATE_WRITE_AT_UNLOAD);
}
void MapBlock::updateDayNightDiff()
{
if(data == NULL)
@ -818,10 +805,9 @@ void MapBlock::deSerialize(std::istream &is, u8 version)
void MapBlock::serializeDiskExtra(std::ostream &os, u8 version)
{
// Versions up from 9 have block objects.
// Versions up from 9 have block objects. (DEPRECATED)
if(version >= 9)
{
//serializeObjects(os, version); // DEPRECATED
// count=0
writeU16(os, 0);
}
@ -842,11 +828,17 @@ void MapBlock::serializeDiskExtra(std::ostream &os, u8 version)
void MapBlock::deSerializeDiskExtra(std::istream &is, u8 version)
{
/*
Versions up from 9 have block objects.
Versions up from 9 have block objects. (DEPRECATED)
*/
if(version >= 9)
{
updateObjects(is, version, NULL, 0);
u16 count = readU16(is);
// Not supported and length not known if count is not 0
if(count != 0){
dstream<<"WARNING: MapBlock::deSerializeDiskExtra(): "
<<"Ignoring stuff coming at and after MBOs"<<std::endl;
return;
}
}
/*