diff options
Diffstat (limited to 'game/client/game.cc')
| -rw-r--r-- | game/client/game.cc | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/game/client/game.cc b/game/client/game.cc index af6fba6..c1d3fa8 100644 --- a/game/client/game.cc +++ b/game/client/game.cc @@ -342,7 +342,9 @@ void client_game::init(void) globals::gui_scale = 0U; globals::gui_screen = GUI_MAIN_MENU; - sound::init(); + if(globals::sound_ctx) { + sound::init(); + } client_receive::init(); @@ -356,7 +358,9 @@ void client_game::init_late(void) { toggles::init_late(); - sound::init_late(); + if(globals::sound_ctx) { + sound::init_late(); + } language::init_late(); @@ -418,7 +422,9 @@ void client_game::deinit(void) session::deinit(); - sound::deinit(); + if(globals::sound_ctx) { + sound::deinit(); + } hotbar::deinit(); main_menu::deinit(); @@ -506,9 +512,13 @@ void client_game::update(void) else globals::dimension->entities.emplace_or_replace<GravityComponent>(globals::player); } - sound::update(); + if(globals::sound_ctx) { + sound::update(); - listener::update(); + listener::update(); + + SoundEmitterComponent::update(); + } interpolation::update(); @@ -516,8 +526,6 @@ void client_game::update(void) camera::update(); - SoundEmitterComponent::update(); - voxel_anims::update(); chunk_mesher::update(); |
