mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 00:02:55 +00:00
ZoneLoading: Fix not respecting the block type when trying to load data
This commit is contained in:
parent
731bef73df
commit
80bc10752a
@ -122,7 +122,22 @@ void XBlockInputStream::LoadDataInBlock(void* dst, const size_t size)
|
|||||||
// Theoretically ptr should always be at the current block offset.
|
// Theoretically ptr should always be at the current block offset.
|
||||||
assert(dst == &block->m_buffer[m_block_offsets[block->m_index]]);
|
assert(dst == &block->m_buffer[m_block_offsets[block->m_index]]);
|
||||||
|
|
||||||
|
switch (block->m_type)
|
||||||
|
{
|
||||||
|
case XBlock::Type::BLOCK_TYPE_TEMP:
|
||||||
|
case XBlock::Type::BLOCK_TYPE_NORMAL:
|
||||||
m_stream->Load(dst, size);
|
m_stream->Load(dst, size);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case XBlock::Type::BLOCK_TYPE_RUNTIME:
|
||||||
|
memset(dst, 0, size);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case XBlock::Type::BLOCK_TYPE_DELAY:
|
||||||
|
assert(false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
IncBlockPos(size);
|
IncBlockPos(size);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user