From: terencehill Date: Sun, 4 Aug 2013 11:55:55 +0000 (+0200) Subject: Removing the last track, select the new last track X-Git-Tag: xonotic-v0.8.1~157^2~13 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2c4bd78b8c87b7f00895f2f5159c785a5b6aba70;p=xonotic%2Fxonotic-data.pk3dir.git Removing the last track, select the new last track --- diff --git a/qcsrc/menu/xonotic/playlist.c b/qcsrc/menu/xonotic/playlist.c index c1545b18e..0c3949185 100644 --- a/qcsrc/menu/xonotic/playlist.c +++ b/qcsrc/menu/xonotic/playlist.c @@ -97,6 +97,8 @@ void XonoticPlayList_removeFromPlayList(entity me, string track) { if(argv(i) == track) { + if(i == me.nItems - 1) + me.setSelected(me, me.selectedItem - 1); if(cvar("music_playlist_index") == 0 || cvar("music_playlist_index") == 999) { if(cvar("music_playlist_current0") == i)