Fix MaterialProperties serialization (constant_time was missing)
authorPerttu Ahola <celeron55@gmail.com>
Tue, 15 Nov 2011 20:04:16 +0000 (22:04 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Tue, 29 Nov 2011 17:13:45 +0000 (19:13 +0200)
src/materials.cpp

index 72547faceaf5e45ffa4f419578fe79b3ebf8766a..ab2e2d2730982aeb1c335f6d6d0c47346e555cb4 100644 (file)
@@ -27,6 +27,7 @@ void MaterialProperties::serialize(std::ostream &os)
 {
        writeU8(os, 0); // version
        writeU8(os, diggability);
+       writeF1000(os, constant_time);
        writeF1000(os, weight);
        writeF1000(os, crackiness);
        writeF1000(os, crumbliness);
@@ -39,6 +40,7 @@ void MaterialProperties::deSerialize(std::istream &is)
        if(version != 0)
                throw SerializationError("unsupported MaterialProperties version");
        diggability = (enum Diggability)readU8(is);
+       constant_time = readF1000(is);
        weight = readF1000(is);
        crackiness = readF1000(is);
        crumbliness = readF1000(is);