From ff73c7a5da6ab8ac0bb678ebf25b83e805397029 Mon Sep 17 00:00:00 2001 From: Rui Date: Sun, 11 Jun 2017 20:58:26 +0900 Subject: Sound: Add pitch option (#5960) * Sound: Add pitch option --- src/itemdef.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/itemdef.cpp') diff --git a/src/itemdef.cpp b/src/itemdef.cpp index f1cc03c4b..ca6020e14 100644 --- a/src/itemdef.cpp +++ b/src/itemdef.cpp @@ -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) {}; } -- cgit v1.2.3