Skip to content

Commit

Permalink
Remove listener update when in editor (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
CedNaru authored Mar 19, 2024
1 parent 695c7ec commit 1d3d7f5
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/fmod_server.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "classes/engine.hpp"
#include "core/fmod_sound.h"
#include "data/performance_data.h"
#include "helpers/common.h"
Expand Down Expand Up @@ -230,8 +231,16 @@ void FmodServer::update() {
if (!event->is_valid()) { runningEvents.erase(event); }
}

_set_listener_attributes();
_update_performance_data();
#ifdef TOOLS_ENABLED
if (!Engine::get_singleton()->is_editor_hint()) {
#endif
// Editor only needs to run the server for events preview in the explorer.
// We don't need to update performance_data and listeners
_set_listener_attributes();
_update_performance_data();
#ifdef TOOLS_ENABLED
}
#endif

ERROR_CHECK(system->update());
}
Expand Down

0 comments on commit 1d3d7f5

Please sign in to comment.