diff options
Diffstat (limited to 'scene/3d/room_instance.cpp')
-rw-r--r-- | scene/3d/room_instance.cpp | 46 |
1 files changed, 3 insertions, 43 deletions
diff --git a/scene/3d/room_instance.cpp b/scene/3d/room_instance.cpp index cdca54cd84..a2e1a48781 100644 --- a/scene/3d/room_instance.cpp +++ b/scene/3d/room_instance.cpp @@ -56,17 +56,11 @@ void Room::_notification(int p_what) { } - if (sound_enabled) - SpatialSoundServer::get_singleton()->room_set_space(sound_room,get_world()->get_sound_space()); - } break; case NOTIFICATION_TRANSFORM_CHANGED: { - SpatialSoundServer::get_singleton()->room_set_transform(sound_room,get_global_transform()); } break; case NOTIFICATION_EXIT_WORLD: { - if (sound_enabled) - SpatialSoundServer::get_singleton()->room_set_space(sound_room,RID()); } break; @@ -158,61 +152,27 @@ void Room::_parse_node_faces(PoolVector<Face3> &all_faces,const Node *p_node) co -void Room::set_simulate_acoustics(bool p_enable) { - - if (sound_enabled==p_enable) - return; - - sound_enabled=p_enable; - if (!is_inside_world()) - return; //nothing to do - - if (sound_enabled) - SpatialSoundServer::get_singleton()->room_set_space(sound_room,get_world()->get_sound_space()); - else - SpatialSoundServer::get_singleton()->room_set_space(sound_room,RID()); - - -} - void Room::_bounds_changed() { update_gizmo(); } -bool Room::is_simulating_acoustics() const { - - return sound_enabled; -} - -RID Room::get_sound_room() const { - - return RID(); -} - void Room::_bind_methods() { ClassDB::bind_method(_MD("set_room","room:Room"),&Room::set_room ); ClassDB::bind_method(_MD("get_room:Room"),&Room::get_room ); - - ClassDB::bind_method(_MD("set_simulate_acoustics","enable"),&Room::set_simulate_acoustics ); - ClassDB::bind_method(_MD("is_simulating_acoustics"),&Room::is_simulating_acoustics ); - - - ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "room/room", PROPERTY_HINT_RESOURCE_TYPE, "Area" ), _SCS("set_room"), _SCS("get_room") ); - ADD_PROPERTY( PropertyInfo( Variant::BOOL, "room/simulate_acoustics"), _SCS("set_simulate_acoustics"), _SCS("is_simulating_acoustics") ); + } Room::Room() { - sound_enabled=false; - sound_room=SpatialSoundServer::get_singleton()->room_create(); +// sound_enabled=false; level=0; @@ -222,6 +182,6 @@ Room::Room() { Room::~Room() { - SpatialSoundServer::get_singleton()->free(sound_room); + } |