mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-29 20:25:19 +01:00
Re-order sound-related code (#12382)
Dropped ServerSoundParams -> moved to ServerPlayingSound. This gets rid of the duplicated 'fade' and 'pitch' values on server-side where only one was used anyway. SimpleSoundSpec is the basic sound without positional information, hence 'loop' is included. Recursively added PROTOCOL_VERSION to most functions to reduce the versioning mess in the future. Per-type version numbers are kept for now as a safety rope in a special case.
This commit is contained in:
@@ -19,7 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "tileanimation.h"
|
||||
#include "util/serialize.h"
|
||||
|
||||
void TileAnimationParams::serialize(std::ostream &os, u8 tiledef_version) const
|
||||
void TileAnimationParams::serialize(std::ostream &os, u16 protocol_version) const
|
||||
{
|
||||
writeU8(os, type);
|
||||
if (type == TAT_VERTICAL_FRAMES) {
|
||||
@@ -33,7 +33,7 @@ void TileAnimationParams::serialize(std::ostream &os, u8 tiledef_version) const
|
||||
}
|
||||
}
|
||||
|
||||
void TileAnimationParams::deSerialize(std::istream &is, u8 tiledef_version)
|
||||
void TileAnimationParams::deSerialize(std::istream &is, u16 protocol_version)
|
||||
{
|
||||
type = (TileAnimationType) readU8(is);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user