/*
Copyright (C) 1996-1997 Id Software, Inc.
+Copyright (C) 2000-2020 DarkPlaces contributors
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
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);