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

summaryrefslogtreecommitdiff
path: root/source/game/StarWorldClient.cpp
diff options
context:
space:
mode:
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));
}