Browse Source

Fix startGame's logic in engine.js.

(cherry picked from commit cb29ce8a3ba00a72b67e0520d3e3cac03d41343d)
Relintai 5 years ago
parent
commit
58c58ec212
1 changed files with 2 additions and 4 deletions
  1. 2 4
      platform/javascript/engine.js

+ 2 - 4
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)