move map url to else case
This commit is contained in:
parent
f431e769cc
commit
8d67947bc1
1 changed files with 2 additions and 2 deletions
|
@ -598,7 +598,6 @@ export class GameScene extends ResizableScene implements CenterListener {
|
||||||
if (url === undefined) {
|
if (url === undefined) {
|
||||||
audioManager.unloadAudio();
|
audioManager.unloadAudio();
|
||||||
} else {
|
} else {
|
||||||
const mapDirUrl = this.MapUrlFile.substr(0, this.MapUrlFile.lastIndexOf('/'));
|
|
||||||
const audioPath = url as string;
|
const audioPath = url as string;
|
||||||
let realAudioPath = '';
|
let realAudioPath = '';
|
||||||
|
|
||||||
|
@ -607,6 +606,7 @@ export class GameScene extends ResizableScene implements CenterListener {
|
||||||
realAudioPath = audioPath;
|
realAudioPath = audioPath;
|
||||||
} else {
|
} else {
|
||||||
// local file, include it relative to map directory
|
// local file, include it relative to map directory
|
||||||
|
const mapDirUrl = this.MapUrlFile.substr(0, this.MapUrlFile.lastIndexOf('/'));
|
||||||
realAudioPath = mapDirUrl + '/' + url;
|
realAudioPath = mapDirUrl + '/' + url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue