forked from 0ad/0ad
Fixes in-game music playing (assume filename always contains ogg extension). Fixes #956.
This was SVN commit r10285.
This commit is contained in:
parent
170fc8e8b0
commit
b1d98cff04
@ -25,10 +25,10 @@ function Music()
|
|||||||
this.MUSIC_BATTLE = "battle";
|
this.MUSIC_BATTLE = "battle";
|
||||||
|
|
||||||
this.tracks = {
|
this.tracks = {
|
||||||
MAIN_MENU_TRACK : "main_menu",
|
MAIN_MENU_TRACK : "main_menu.ogg",
|
||||||
VICTORY_TRACK : "win_1",
|
VICTORY_TRACK : "win_1.ogg",
|
||||||
DEFEAT_TRACK : "gen_loss_track",
|
DEFEAT_TRACK : "gen_loss_track.ogg",
|
||||||
DEFEAT_CUE_TRACK : "gen_loss_cue"
|
DEFEAT_CUE_TRACK : "gen_loss_cue.ogg"
|
||||||
};
|
};
|
||||||
|
|
||||||
this.states = {
|
this.states = {
|
||||||
@ -152,7 +152,7 @@ Music.prototype.switchMusic = function(track, fadeInPeriod, isLooping)
|
|||||||
this.currentMusic = null;
|
this.currentMusic = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.currentMusic = new Sound(this.RELATIVE_MUSIC_PATH + track + ".ogg");
|
this.currentMusic = new Sound(this.RELATIVE_MUSIC_PATH + track);
|
||||||
|
|
||||||
if (this.currentMusic)
|
if (this.currentMusic)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user