mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
parent
03ff53e16b
commit
ff73c7a5da
10 changed files with 68 additions and 54 deletions
|
@ -156,6 +156,8 @@ void ItemDefinition::serialize(std::ostream &os, u16 protocol_version) const
|
|||
writeF1000(os, sound_place_failed.gain);
|
||||
os << serializeString(palette_image);
|
||||
writeU32(os, color.color);
|
||||
writeF1000(os, sound_place.pitch);
|
||||
writeF1000(os, sound_place_failed.pitch);
|
||||
}
|
||||
|
||||
void ItemDefinition::deSerialize(std::istream &is)
|
||||
|
@ -214,6 +216,8 @@ void ItemDefinition::deSerialize(std::istream &is)
|
|||
sound_place_failed.gain = readF1000(is);
|
||||
palette_image = deSerializeString(is);
|
||||
color.set(readU32(is));
|
||||
sound_place.pitch = readF1000(is);
|
||||
sound_place_failed.pitch = readF1000(is);
|
||||
} catch(SerializationError &e) {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue