cleaned up some redundant file reads and fixed file opening in the movie player.

As a streaming action this cannot borrow the one from the archive.
This commit is contained in:
Christoph Oelckers 2023-12-13 16:56:47 +01:00
commit df3e82d94c
10 changed files with 31 additions and 17 deletions

View file

@ -1329,9 +1329,18 @@ FileReader FileSystem::ReopenFileReader(int lump, bool alwayscache)
FileReader FileSystem::OpenFileReader(const char* name)
{
FileReader fr;
auto lump = CheckNumForFullName(name);
if (lump < 0) return FileReader();
else return OpenFileReader(lump);
if (lump >= 0) fr = OpenFileReader(lump);
return fr;
}
FileReader FileSystem::ReopenFileReader(const char* name, bool alwayscache)
{
FileReader fr;
auto lump = CheckNumForFullName(name);
if (lump >= 0) fr = ReopenFileReader(lump, alwayscache);
return fr;
}
//==========================================================================