play sound functioning

This commit is contained in:
David Markowitz
2025-04-02 22:15:14 -07:00
parent 480bc49c4f
commit e1913ffc9f
3 changed files with 40 additions and 14 deletions

View File

@@ -6456,4 +6456,9 @@ namespace GameMessages {
stream.Write(duration != 3.0f);
if (builderID != 3.0f) stream.Write(duration);
}
void PlayBehaviorSound::Serialize(RakNet::BitStream& stream) const {
stream.Write(soundID != -1);
if (soundID != -1) stream.Write(soundID);
}
}

View File

@@ -821,6 +821,14 @@ namespace GameMessages {
LWOOBJID builderID{ LWOOBJID_EMPTY };
float duration{ 3.0f };
};
struct PlayBehaviorSound : public GameMsg {
PlayBehaviorSound() : GameMsg(MessageType::Game::PLAY_BEHAVIOR_SOUND) {}
void Serialize(RakNet::BitStream& stream) const;
int32_t soundID{ -1 };
};
};
#endif // GAMEMESSAGES_H