mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-19 15:52:53 +00:00
ObjLoading: Add possibility to go back to the beginning of a IPakEntryReadStream
This commit is contained in:
parent
4baca81210
commit
43fa845839
@ -300,7 +300,20 @@ int64_t IPakEntryReadStream::Pos()
|
||||
|
||||
void IPakEntryReadStream::Goto(const int64_t pos)
|
||||
{
|
||||
if (pos > m_file_offset)
|
||||
if(pos == 0)
|
||||
{
|
||||
m_pos = m_base_pos;
|
||||
|
||||
m_file_head = 0;
|
||||
m_file_offset = 0;
|
||||
|
||||
m_current_block = nullptr;
|
||||
m_next_command = 0;
|
||||
m_current_command_buffer = nullptr;
|
||||
m_current_command_length = 0;
|
||||
m_current_command_offset = 0;
|
||||
}
|
||||
else if (pos > m_file_offset)
|
||||
{
|
||||
Skip(pos - m_file_offset);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user