1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Proselytize the network. Use IEEE F32 (#8030)

* Proselytize the network. Use IEEE F32
* Remove unused V2F1000 functions
This commit is contained in:
SmallJoker 2019-01-03 17:04:26 +01:00 committed by Loïc Blot
parent ceacff13a6
commit bba4563d89
19 changed files with 237 additions and 262 deletions

View file

@ -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;
}