mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- backslash eradication in sound definitions.
World Tour does this badly, even using double backslashes.
This commit is contained in:
parent
d5b7935ca1
commit
8b2302ec67
1 changed files with 6 additions and 2 deletions
|
@ -163,7 +163,11 @@ int S_DefineSound(unsigned index, const char *filename, int minpitch, int maxpit
|
||||||
if (sndinf[kFlags] & SF_LOOP)
|
if (sndinf[kFlags] & SF_LOOP)
|
||||||
sndinf[kFlags] |= SF_ONEINST_INTERNAL;
|
sndinf[kFlags] |= SF_ONEINST_INTERNAL;
|
||||||
|
|
||||||
sfx->lumpnum = S_LookupSound(filename);
|
// Take care of backslashes in sound names. Also double backslashes which occur in World Tour.
|
||||||
|
FString fn = filename;
|
||||||
|
fn.Substitute("\\\\", "\\");
|
||||||
|
FixPathSeperator(fn);
|
||||||
|
sfx->lumpnum = S_LookupSound(fn);
|
||||||
sndinf[kPitchStart] = clamp(minpitch, INT16_MIN, INT16_MAX);
|
sndinf[kPitchStart] = clamp(minpitch, INT16_MIN, INT16_MAX);
|
||||||
sndinf[kPitchEnd] = clamp(maxpitch, INT16_MIN, INT16_MAX);
|
sndinf[kPitchEnd] = clamp(maxpitch, INT16_MIN, INT16_MAX);
|
||||||
sndinf[kPriority] = priority & 255;
|
sndinf[kPriority] = priority & 255;
|
||||||
|
@ -171,7 +175,7 @@ int S_DefineSound(unsigned index, const char *filename, int minpitch, int maxpit
|
||||||
sfx->Volume = volume;
|
sfx->Volume = volume;
|
||||||
sfx->NearLimit = 6;
|
sfx->NearLimit = 6;
|
||||||
sfx->bTentative = false;
|
sfx->bTentative = false;
|
||||||
sfx->name = filename;
|
sfx->name = std::move(fn);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue