MSRS - honor port setting and coalition. Repaired command string for .bat sound file production

Added mission slash in SOUNDFILE
This commit is contained in:
Applevangelist
2022-04-10 18:28:37 +02:00
parent e84156d2e9
commit a685f3ffbd
2 changed files with 13 additions and 7 deletions

View File

@@ -183,13 +183,17 @@ do -- Sound File
--- Set path, where the sound file is located.
-- @param #SOUNDFILE self
-- @param #string Path Path to the directory, where the sound file is located.
-- @param #string Path Path to the directory, where the sound file is located. In case this is nil, it defaults to the DCS mission temp directory.
-- @return #SOUNDFILE self
function SOUNDFILE:SetPath(Path)
-- Init path.
self.path=Path or "l10n/DEFAULT/"
if not Path and self.useSRS then -- use path to mission temp dir
self.path = os.getenv('TMP') .. "\\DCS\\Mission\\l10n\\DEFAULT"
end
-- Remove (back)slashes.
local nmax=1000 ; local n=1
while (self.path:sub(-1)=="/" or self.path:sub(-1)==[[\]]) and n<=nmax do