--- deliantra/Deliantra-Client/bin/cfplus 2007/07/12 17:56:51 1.163 +++ deliantra/Deliantra-Client/bin/cfplus 2007/07/12 18:28:34 1.164 @@ -2047,17 +2047,18 @@ @MUSIC_WANT = { path => CFPlus::find_rcfile "music/$MUSIC_DEFAULT" } unless @MUSIC_WANT; # if the currently playing song is acceptable, let it continue - return if grep $MUSIC_PLAYING eq $_->{path}, @MUSIC_WANT; + return if $MUSIC_PLAYING + && grep $MUSIC_PLAYING->{path} eq $_->{path}, @MUSIC_WANT; - if (defined $MUSIC_PLAYING) { + if ($MUSIC_PLAYING) { warn "fade out"; - CFPlus::MixMusic::fade_out 2000; + CFPlus::MixMusic::fade_out 1500; } else { warn "new music\n"; my $music = $MUSIC_WANT [rand @MUSIC_WANT]; - $MUSIC_PLAYING = $music->{path}; + $MUSIC_PLAYING = $music; $MUSIC_PLAYER = new_from_file CFPlus::MixMusic $music->{path}; $MUSIC_PLAYER->play (0);