summaryrefslogtreecommitdiffstats
path: root/game/client/factory.cc
diff options
context:
space:
mode:
Diffstat (limited to 'game/client/factory.cc')
-rw-r--r--game/client/factory.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/game/client/factory.cc b/game/client/factory.cc
index 636cf35..5eca00c 100644
--- a/game/client/factory.cc
+++ b/game/client/factory.cc
@@ -6,6 +6,7 @@
#include "shared/head.hh"
#include "shared/transform.hh"
+#include "client/globals.hh"
#include "client/sound_emitter.hh"
void client_factory::create_player(Dimension *dimension, entt::entity entity)
@@ -20,5 +21,7 @@ void client_factory::create_player(Dimension *dimension, entt::entity entity)
dimension->entities.emplace_or_replace<TransformComponentIntr>(entity, transform);
dimension->entities.emplace_or_replace<TransformComponentPrev>(entity, transform);
- dimension->entities.emplace_or_replace<SoundEmitterComponent>(entity);
+ if(globals::sound_ctx) {
+ dimension->entities.emplace_or_replace<SoundEmitterComponent>(entity);
+ }
}