Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/game/StarWorldClient.cpp
diff options
context:
space:
mode:
authorBottinator22 <bottinator22@gmail.com>2024-01-02 23:08:51 -0800
committerBottinator22 <bottinator22@gmail.com>2024-01-02 23:08:51 -0800
commit91cf2d82515583d7627ce3fd452f81e345918144 (patch)
tree6d9ea19b3e910ba7e5bb1f2c4bfc9dd2c4dcd516 /source/game/StarWorldClient.cpp
parent9e605b182da26bd9fc2f28805d5f08c6764e47a3 (diff)
Add fork changes (move instruments to their own audio group)
Diffstat (limited to 'source/game/StarWorldClient.cpp')
-rw-r--r--source/game/StarWorldClient.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/game/StarWorldClient.cpp b/source/game/StarWorldClient.cpp
index b2a79fb..3c83d4d 100644
--- a/source/game/StarWorldClient.cpp
+++ b/source/game/StarWorldClient.cpp
@@ -165,6 +165,7 @@ void WorldClient::removeEntity(EntityId entityId, bool andDie) {
m_particles->addParticles(move(renderCallback.particles));
m_samples.appendAll(move(renderCallback.audios));
+ m_instrumentSamples.appendAll(move(renderCallback.instrumentAudios));
}
if (auto version = m_masterEntitiesNetVersion.maybeTake(entity->entityId())) {
@@ -545,6 +546,7 @@ void WorldClient::render(WorldRenderData& renderData, unsigned bufferTiles) {
m_particles->addParticles(move(renderCallback.particles));
m_samples.appendAll(move(renderCallback.audios));
+ m_instrumentSamples.appendAll(move(renderCallback.instrumentAudios));
previewTiles.appendAll(move(renderCallback.previewTiles));
renderData.overheadBars.appendAll(move(renderCallback.overheadBars));
@@ -685,6 +687,9 @@ void WorldClient::render(WorldRenderData& renderData, unsigned bufferTiles) {
List<AudioInstancePtr> WorldClient::pullPendingAudio() {
return take(m_samples);
}
+List<AudioInstancePtr> WorldClient::pullPendingInstrumentAudio() {
+ return take(m_instrumentSamples);
+}
List<AudioInstancePtr> WorldClient::pullPendingMusic() {
return take(m_music);
@@ -2137,6 +2142,10 @@ void WorldClient::ClientRenderCallback::addAudio(AudioInstancePtr audio) {
audios.append(move(audio));
}
+void WorldClient::ClientRenderCallback::addInstrumentAudio(AudioInstancePtr audio) {
+ instrumentAudios.append(move(audio));
+}
+
void WorldClient::ClientRenderCallback::addTilePreview(PreviewTile preview) {
previewTiles.append(move(preview));
}