X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=console.c;h=75809f49eb1d8504606816b540b1080a18b628ba;hb=2ee33d88c90a282bc5e0404120ad29c30a2621f1;hp=219a68d7bca0d002cd6920652f15591f10e11315;hpb=b49b978aa7e5f734a083abc02110b1e8c5682c26;p=xonotic%2Fdarkplaces.git diff --git a/console.c b/console.c index 219a68d7..75809f49 100644 --- a/console.c +++ b/console.c @@ -2205,10 +2205,15 @@ qbool GetMapList (const char *s, char *completedname, int completednamebufferlen lumplen = BuffLittleLong(buf + 4 + 8 * LUMP_ENTITIES + 4); dpsnprintf(desc, sizeof(desc), "BSP2RMQe"); } - else + else if(!memcmp(buf, "VBSP", 4)) { - dpsnprintf(desc, sizeof(desc), "unknown%i", BuffLittleLong(buf)); + hl2dheader_t *header = (hl2dheader_t *)buf; + lumpofs = LittleLong(header->lumps[HL2LUMP_ENTITIES].fileofs); + lumplen = LittleLong(header->lumps[HL2LUMP_ENTITIES].filelen); + dpsnprintf(desc, sizeof(desc), "VBSP%i", LittleLong(((int *)buf)[1])); } + else + dpsnprintf(desc, sizeof(desc), "unknown%i", BuffLittleLong(buf)); strlcpy(entfilename, t->filenames[i], sizeof(entfilename)); memcpy(entfilename + strlen(entfilename) - 4, ".ent", 5); entities = (char *)FS_LoadFile(entfilename, tempmempool, true, NULL);