mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-17 10:25:21 +02: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:
@@ -97,7 +97,7 @@ struct ItemDefinition
|
||||
~ItemDefinition();
|
||||
void reset();
|
||||
void serialize(std::ostream &os, u16 protocol_version) const;
|
||||
void deSerialize(std::istream &is);
|
||||
void deSerialize(std::istream &is, u16 protocol_version);
|
||||
private:
|
||||
void resetInitial();
|
||||
};
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
const std::string &convert_to)=0;
|
||||
|
||||
virtual void serialize(std::ostream &os, u16 protocol_version)=0;
|
||||
virtual void deSerialize(std::istream &is)=0;
|
||||
virtual void deSerialize(std::istream &is, u16 protocol_version)=0;
|
||||
|
||||
// Do stuff asked by threads that can only be done in the main thread
|
||||
virtual void processQueue(IGameDef *gamedef)=0;
|
||||
|
Reference in New Issue
Block a user