diff options
author | Relintai <relintai@gmail.com> | 2020-02-06 13:01:30 +0100 |
---|---|---|
committer | Relintai <relintai@gmail.com> | 2020-02-12 23:13:53 +0100 |
commit | cb29ce8a3ba00a72b67e0520d3e3cac03d41343d (patch) | |
tree | 74c8dffbd3d31d2a4bbfa22d29994e79224b367b /platform | |
parent | c48237967a0a4d3901c157a828017d7330df0578 (diff) |
Fix startGame's logic in engine.js.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/javascript/engine.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/platform/javascript/engine.js b/platform/javascript/engine.js index 1f78aa672d..227accadb0 100644 --- a/platform/javascript/engine.js +++ b/platform/javascript/engine.js @@ -134,12 +134,10 @@ this.startGame = function(execName, mainPack) { executableName = execName; - var mainArgs = [ '--main-pack', mainPack ]; + var mainArgs = [ '--main-pack', getPathLeaf(mainPack) ]; return Promise.all([ - // Load from directory, - this.init(getBasePath(mainPack)), - // ...but write to root where the engine expects it. + this.init(getBasePath(execName)), this.preloadFile(mainPack, getPathLeaf(mainPack)) ]).then( Function.prototype.apply.bind(synchronousStart, this, mainArgs) |