summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-10-10 19:24:15 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-10-10 19:24:15 -0300
commit37354da5b0dc1dc8dcfd9d844e593935311f4f8f (patch)
treedb5d86e9f1181f34afafff34ec03aa8eac2f2a85 /scene
parent7fed1841aa7e501b4020b9ee4c1a65239f0e54cd (diff)
parentf1d9de068cbafda257fb6312ee51994398a8671a (diff)
Merge pull request #773 from hiltonm/fix-2d-spatial-audio
Remove camera check for 2D audio listener.
Diffstat (limited to 'scene')
-rw-r--r--scene/main/viewport.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index bd39fafc8b..7e953e44c7 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -558,7 +558,7 @@ void Viewport::_update_listener() {
void Viewport::_update_listener_2d() {
- if (is_inside_scene() && audio_listener && camera && (!get_parent() || (get_parent()->cast_to<Control>() && get_parent()->cast_to<Control>()->is_visible())))
+ if (is_inside_scene() && audio_listener && (!get_parent() || (get_parent()->cast_to<Control>() && get_parent()->cast_to<Control>()->is_visible())))
SpatialSound2DServer::get_singleton()->listener_set_space(listener_2d,find_world_2d()->get_sound_space());
else
SpatialSound2DServer::get_singleton()->listener_set_space(listener_2d,RID());