diff options
author | SmallJoker <SmallJoker@users.noreply.github.com> | 2019-01-03 17:04:26 +0100 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2019-01-03 17:04:26 +0100 |
commit | bba4563d89b6708d75a4053c69873dff0d747538 (patch) | |
tree | 8ae0c939a8b5c194f300be79e1369ad8ef4675b7 /src/mapblock.cpp | |
parent | ceacff13a666779d75ac48f2cc5c11bc2ce5c6e1 (diff) | |
download | minetest-bba4563d89b6708d75a4053c69873dff0d747538.tar.gz minetest-bba4563d89b6708d75a4053c69873dff0d747538.tar.bz2 minetest-bba4563d89b6708d75a4053c69873dff0d747538.zip |
Proselytize the network. Use IEEE F32 (#8030)
* Proselytize the network. Use IEEE F32
* Remove unused V2F1000 functions
Diffstat (limited to 'src/mapblock.cpp')
-rw-r--r-- | src/mapblock.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/mapblock.cpp b/src/mapblock.cpp index dfb4c783e..734ea478d 100644 --- a/src/mapblock.cpp +++ b/src/mapblock.cpp @@ -446,9 +446,7 @@ void MapBlock::serializeNetworkSpecific(std::ostream &os) throw SerializationError("ERROR: Not writing dummy block."); } - writeU8(os, 1); // version - writeF1000(os, 0); // deprecated heat - writeF1000(os, 0); // deprecated humidity + writeU8(os, 2); // version } void MapBlock::deSerialize(std::istream &is, u8 version, bool disk) @@ -559,16 +557,11 @@ void MapBlock::deSerialize(std::istream &is, u8 version, bool disk) void MapBlock::deSerializeNetworkSpecific(std::istream &is) { try { - int version = readU8(is); + const u8 version = readU8(is); //if(version != 1) // throw SerializationError("unsupported MapBlock version"); - if(version >= 1) { - readF1000(is); // deprecated heat - readF1000(is); // deprecated humidity - } - } - catch(SerializationError &e) - { + + } catch(SerializationError &e) { warningstream<<"MapBlock::deSerializeNetworkSpecific(): Ignoring an error" <<": "<<e.what()<<std::endl; } |