1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Implement node timers

This commit is contained in:
darkrose 2012-07-17 23:00:04 +10:00 committed by Perttu Ahola
parent 829f262c79
commit cd6becd442
12 changed files with 368 additions and 45 deletions

View file

@ -621,9 +621,9 @@ void MapBlock::serialize(std::ostream &os, u8 version, bool disk)
// (this field should have not been added)
if(version == 23)
writeU8(os, 0);
// Node timers (uncomment when node timers are taken into use)
/*if(version >= 24)
m_node_timers.serialize(os);*/
// Node timers are in version 24
if(version >= 24)
m_node_timers.serialize(os);
// Static objects
m_static_objects.serialize(os);
@ -703,15 +703,15 @@ void MapBlock::deSerialize(std::istream &is, u8 version, bool disk)
if(disk)
{
// Node timers
if(version == 23)
if(version == 23){
// Read unused zero
readU8(is);
// Uncomment when node timers are taken into use
/*else if(version >= 24){
}
else if(version >= 24){
TRACESTREAM(<<"MapBlock::deSerialize "<<PP(getPos())
<<": Node timers"<<std::endl);
m_node_timers.deSerialize(is);
}*/
}
// Static objects
TRACESTREAM(<<"MapBlock::deSerialize "<<PP(getPos())