From d96db0d329927e6e35577625d5bf3347ecf34543 Mon Sep 17 00:00:00 2001 From: Marc Gilleron Date: Sun, 26 Jul 2020 18:42:17 +0100 Subject: [PATCH] Fix node config warning with file streams by using channels from the fallback stream --- streams/voxel_stream_file.cpp | 6 ++++++ streams/voxel_stream_file.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/streams/voxel_stream_file.cpp b/streams/voxel_stream_file.cpp index 38d22832..80976c9e 100644 --- a/streams/voxel_stream_file.cpp +++ b/streams/voxel_stream_file.cpp @@ -46,6 +46,12 @@ void VoxelStreamFile::emerge_blocks_fallback(Vector &requests } } +int VoxelStreamFile::get_used_channels_mask() const { + if (_fallback_stream.is_valid()) { + return _fallback_stream->get_used_channels_mask(); + } +} + FileAccess *VoxelStreamFile::open_file(const String &fpath, int mode_flags, Error *err) { VOXEL_PROFILE_SCOPE(profile_scope); uint64_t time_before = OS::get_singleton()->get_ticks_usec(); diff --git a/streams/voxel_stream_file.h b/streams/voxel_stream_file.h index f6dd6dc4..fda9e08e 100644 --- a/streams/voxel_stream_file.h +++ b/streams/voxel_stream_file.h @@ -24,6 +24,8 @@ public: virtual int get_block_size_po2() const; virtual int get_lod_count() const; + int get_used_channels_mask() const override; + protected: static void _bind_methods();