1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Fix startGame's logic in engine.js.

This commit is contained in:
Relintai
2020-02-06 13:01:30 +01:00
parent c48237967a
commit cb29ce8a3b

View File

@@ -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)