]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix Map Info dialog can be opened by pressing ENTER in the map list if there are...
authorterencehill <piuntn@gmail.com>
Mon, 7 Feb 2011 18:05:49 +0000 (19:05 +0100)
committerterencehill <piuntn@gmail.com>
Mon, 7 Feb 2011 18:05:49 +0000 (19:05 +0100)
This bug fix also disables other keys when there are no maps as there's nothing to do

qcsrc/menu/xonotic/maplist.c

index 1390ff3b1a1c22abd115612719341a3ac234b0f1..69757126b4c2a83fdd945f8eba0fd1b041544e0c 100644 (file)
@@ -297,6 +297,8 @@ void MapList_LoadMap(entity btn, entity me)
 float XonoticMapList_keyDown(entity me, float scan, float ascii, float shift)
 {
        string ch, save;
+       if(me.nItems <= 0)
+               return SUPER(XonoticMapList).keyDown(me, scan, ascii, shift);
        if(scan == K_ENTER || scan == K_KP_ENTER)
        {
                // pop up map info screen