Merge pull request #773 from hiltonm/fix-2d-spatial-audio

Remove camera check for 2D audio listener.
This commit is contained in:
Juan Linietsky 2014-10-10 19:24:15 -03:00
commit 37354da5b0
1 changed files with 1 additions and 1 deletions

View File

@ -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());