ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/bin/cfplus
(Generate patch)

Comparing deliantra/Deliantra-Client/bin/cfplus (file contents):
Revision 1.164 by root, Thu Jul 12 18:28:34 2007 UTC vs.
Revision 1.165 by root, Thu Jul 12 18:57:45 2007 UTC

2041} 2041}
2042 2042
2043sub audio_music_changed { 2043sub audio_music_changed {
2044 return unless $CFG->{bgm_enable}; 2044 return unless $CFG->{bgm_enable};
2045 2045
2046 # default MUSIC_WANT, undef/0 == MUSIC_DEFAULT 2046 # default MUSIC_WANT == MUSIC_DEFAULT
2047 @MUSIC_WANT = { path => CFPlus::find_rcfile "music/$MUSIC_DEFAULT" } unless @MUSIC_WANT; 2047 @MUSIC_WANT = { path => CFPlus::find_rcfile "music/$MUSIC_DEFAULT" } unless @MUSIC_WANT;
2048 2048
2049 # if the currently playing song is acceptable, let it continue 2049 # if the currently playing song is acceptable, let it continue
2050 return if $MUSIC_PLAYING 2050 return if $MUSIC_PLAYING
2051 && grep $MUSIC_PLAYING->{path} eq $_->{path}, @MUSIC_WANT; 2051 && grep $MUSIC_PLAYING->{path} eq $_->{path}, @MUSIC_WANT;
2052 2052
2053 if ($MUSIC_PLAYING) { 2053 if ($MUSIC_PLAYING) {
2054 warn "fade out";
2055 CFPlus::MixMusic::fade_out 1500; 2054 CFPlus::MixMusic::fade_out 1000;
2056 } else { 2055 } else {
2057 warn "new music\n";
2058
2059 my $music = $MUSIC_WANT [rand @MUSIC_WANT]; 2056 my $music = $MUSIC_WANT [rand @MUSIC_WANT];
2060 2057
2061 $MUSIC_PLAYING = $music; 2058 $MUSIC_PLAYING = $music;
2062 2059
2063 $MUSIC_PLAYER = new_from_file CFPlus::MixMusic $music->{path}; 2060 $MUSIC_PLAYER = new_from_file CFPlus::MixMusic $music->{path};

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines