diff --git a/dist/server/api/game.js b/dist/server/api/game.js index 08aa62ae..dfd3919a 100644 --- a/dist/server/api/game.js +++ b/dist/server/api/game.js @@ -232,7 +232,10 @@ exports.run = function (req, res) { return __awaiter(void 0, void 0, void 0, fun } args = []; if (!isHLAE) { - args.push('-applaunch 730', "+exec " + req.query.config); + args.push('-applaunch 730'); + if (exec) { + args.push(exec); + } } else { args.push('-csgoLauncher', '-noGui', '-autoStart', "-csgoExe \"" + GameExePath + "\""); diff --git a/server/api/game.ts b/server/api/game.ts index adf57a05..7a478e55 100644 --- a/server/api/game.ts +++ b/server/api/game.ts @@ -192,7 +192,10 @@ export const run: express.RequestHandler = async (req, res) => { const args = []; if(!isHLAE){ - args.push('-applaunch 730', `+exec ${req.query.config}`); + args.push('-applaunch 730'); + if(exec) { + args.push(exec); + } } else { args.push('-csgoLauncher','-noGui', '-autoStart', `-csgoExe "${GameExePath}"`); if(exec) { diff --git a/src/components/Content/Tabs/Huds/Huds.tsx b/src/components/Content/Tabs/Huds/Huds.tsx index 7f2e5962..450a0d53 100644 --- a/src/components/Content/Tabs/Huds/Huds.tsx +++ b/src/components/Content/Tabs/Huds/Huds.tsx @@ -39,10 +39,10 @@ function createCFG(customRadar: boolean, customKillfeed: boolean, afx: boolean, cfg += `exec ${createCFG(customRadar, customKillfeed, false)}`; } + file += '.cfg'; if(!autoexec){ file = ''; } - file += '.cfg'; return { cfg, file }; } @@ -89,7 +89,7 @@ export default class Huds extends React.Component { } runGame = (afx: boolean) => () => { - const config = createCFG(this.state.form.radar, this.state.form.killfeed, this.state.form.afx).file; + const config = createCFG(this.state.form.radar, this.state.form.killfeed, this.state.form.afx, this.state.form.autoexec).file; if(afx){ return api.game.runExperimental(config); }