Fix node config warning with file streams by using channels from the fallback stream

master
Marc Gilleron 2020-07-26 18:42:17 +01:00
parent e3abe2f7c0
commit d96db0d329
2 changed files with 8 additions and 0 deletions

View File

@ -46,6 +46,12 @@ void VoxelStreamFile::emerge_blocks_fallback(Vector<VoxelBlockRequest> &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();

View File

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