mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- fixed file checks for Blood cutscenes.
The stripped drive-less name wasn't passed to the calling code.
This commit is contained in:
parent
245aa5d3bc
commit
3be4364d6e
1 changed files with 8 additions and 7 deletions
|
@ -161,17 +161,18 @@ void credReset(void)
|
|||
DoUnFade(1);
|
||||
}
|
||||
|
||||
FileReader credKOpen4Load(FString pzFile)
|
||||
bool credKOpen4Load(FString &pzFile)
|
||||
{
|
||||
int nLen = strlen(pzFile);
|
||||
FixPathSeperator(pzFile);
|
||||
auto nHandle = fileSystem.OpenFileReader(pzFile, 0);
|
||||
if (!nHandle.isOpen())
|
||||
auto nHandle = fileSystem.FindFile(pzFile);
|
||||
if (nHandle < 0)
|
||||
{
|
||||
// Hack
|
||||
// Strip the drive letter and retry.
|
||||
if (nLen >= 3 && isalpha(pzFile[0]) && pzFile[1] == ':' && pzFile[2] == '/')
|
||||
{
|
||||
nHandle = fileSystem.OpenFileReader(pzFile.GetChars()+3, 0);
|
||||
pzFile = pzFile.Mid(3);
|
||||
nHandle = fileSystem.FindFile(pzFile);
|
||||
}
|
||||
}
|
||||
return nHandle;
|
||||
|
@ -200,7 +201,7 @@ void credPlaySmk(const char *_pzSMK, const char *_pzWAV, int nWav)
|
|||
FString pzSMK = _pzSMK;
|
||||
FString pzWAV = _pzWAV;
|
||||
auto nHandleSMK = credKOpen4Load(pzSMK);
|
||||
if (!nHandleSMK.isOpen())
|
||||
if (!nHandleSMK)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -238,7 +239,7 @@ void credPlaySmk(const char *_pzSMK, const char *_pzWAV, int nWav)
|
|||
else
|
||||
{
|
||||
auto nHandleWAV = credKOpen4Load(pzWAV);
|
||||
if (nHandleWAV.isOpen())
|
||||
if (nHandleWAV)
|
||||
{
|
||||
sndStartWavDisk(pzWAV, 255);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue