aboutsummaryrefslogtreecommitdiff
path: root/src/mapblock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapblock.cpp')
-rw-r--r--src/mapblock.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/mapblock.cpp b/src/mapblock.cpp
index dd95ab77f..56d4416a4 100644
--- a/src/mapblock.cpp
+++ b/src/mapblock.cpp
@@ -58,7 +58,11 @@ MapBlock::MapBlock(Map *parent, v3s16 pos, IGameDef *gamedef, bool dummy):
m_timestamp(BLOCK_TIMESTAMP_UNDEFINED),
m_disk_timestamp(BLOCK_TIMESTAMP_UNDEFINED),
m_usage_timer(0),
- m_refcount(0)
+ m_refcount(0),
+ heat_time(0),
+ heat(0),
+ humidity_time(0),
+ humidity(0)
{
data = NULL;
if(dummy == false)
@@ -632,6 +636,11 @@ void MapBlock::serialize(std::ostream &os, u8 version, bool disk)
// Node timers
m_node_timers.serialize(os, version);
}
+ } else {
+ if(version >= 26){
+ writeF1000(os, heat);
+ writeF1000(os, humidity);
+ }
}
}
@@ -734,6 +743,11 @@ void MapBlock::deSerialize(std::istream &is, u8 version, bool disk)
<<": Node timers (ver>=25)"<<std::endl);
m_node_timers.deSerialize(is, version);
}
+ } else {
+ if(version >= 26){
+ heat = readF1000(is);
+ humidity = readF1000(is);
+ }
}
TRACESTREAM(<<"MapBlock::deSerialize "<<PP(getPos())