diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-07-15 01:23:10 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-07-15 08:32:34 -0300 |
commit | 2e73be99d8d86d9dad7bcb99518a4d3cbb5c373c (patch) | |
tree | d863db50852afe5d4b0bc15b8452054498004cb1 /scene/resources | |
parent | e64b82ebfcc3475c7a7d2a9196bfe20d6c9e3614 (diff) |
Lots of work on Audio & Physics engine:
-Added new 3D stream player node
-Added ability for Area to capture sound from streams
-Added small features in physics to be able to properly guess distance to areas for sound
-Fixed 3D CollisionObject so shapes are added the same as in 2D, directly from children
-Fixed KinematicBody API to make it the same as 2D.
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/audio_stream_sample.cpp | 2 | ||||
-rw-r--r-- | scene/resources/world.cpp | 7 | ||||
-rw-r--r-- | scene/resources/world.h | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/scene/resources/audio_stream_sample.cpp b/scene/resources/audio_stream_sample.cpp index f12e231074..c8f6007e60 100644 --- a/scene/resources/audio_stream_sample.cpp +++ b/scene/resources/audio_stream_sample.cpp @@ -231,7 +231,7 @@ void AudioStreamPlaybackSample::mix(AudioFrame *p_buffer, float p_rate_scale, in /* some 64-bit fixed point precaches */ - int64_t loop_begin_fp = ((int64_t)len << MIX_FRAC_BITS); + int64_t loop_begin_fp = ((int64_t)base->loop_begin << MIX_FRAC_BITS); int64_t loop_end_fp = ((int64_t)base->loop_end << MIX_FRAC_BITS); int64_t length_fp = ((int64_t)len << MIX_FRAC_BITS); int64_t begin_limit = (base->loop_mode != AudioStreamSample::LOOP_DISABLED) ? loop_begin_fp : 0; diff --git a/scene/resources/world.cpp b/scene/resources/world.cpp index 24551e9135..b84cc9563e 100644 --- a/scene/resources/world.cpp +++ b/scene/resources/world.cpp @@ -299,6 +299,13 @@ PhysicsDirectSpaceState *World::get_direct_space_state() { return PhysicsServer::get_singleton()->space_get_direct_state(space); } +void World::get_camera_list(List<Camera *> *r_cameras) { + + for (Map<Camera *, SpatialIndexer::CameraData>::Element *E = indexer->cameras.front(); E; E = E->next()) { + r_cameras->push_back(E->key()); + } +} + void World::_bind_methods() { ClassDB::bind_method(D_METHOD("get_space"), &World::get_space); diff --git a/scene/resources/world.h b/scene/resources/world.h index 5291b3974b..158086974c 100644 --- a/scene/resources/world.h +++ b/scene/resources/world.h @@ -76,6 +76,8 @@ public: void set_fallback_environment(const Ref<Environment> &p_environment); Ref<Environment> get_fallback_environment() const; + void get_camera_list(List<Camera *> *r_cameras); + PhysicsDirectSpaceState *get_direct_space_state(); World(); |