Initial QuakeLive support.
This commit is contained in:
parent
d8462c5831
commit
2d96a0053e
|
|
@ -603,11 +603,11 @@ void Q3_LoadBSPFile(struct quakefile_s *qf)
|
|||
// swap the header
|
||||
Q3_SwapBlock( (int *)header, sizeof(*header) );
|
||||
|
||||
if ( header->ident != Q3_BSP_IDENT ) {
|
||||
if ( header->ident != Q3_BSP_IDENT && header->ident != QL_BSP_IDENT ) {
|
||||
Error( "%s is not a IBSP file", qf->filename );
|
||||
}
|
||||
if ( header->version != Q3_BSP_VERSION ) {
|
||||
Error( "%s is version %i, not %i", qf->filename, header->version, Q3_BSP_VERSION );
|
||||
if ( header->version != Q3_BSP_VERSION && header->version != QL_BSP_VERSION ) {
|
||||
Error( "%s is version %i, not (%i or %i)", qf->filename, header->version, Q3_BSP_VERSION, QL_BSP_VERSION );
|
||||
}
|
||||
|
||||
q3_numShaders = Q3_CopyLump( header, Q3_LUMP_SHADERS, (void *) &q3_dshaders, sizeof(q3_dshader_t) );
|
||||
|
|
|
|||
|
|
@ -1278,6 +1278,13 @@ int LoadMapFromBSP(struct quakefile_s *qf)
|
|||
|
||||
idheader.ident = LittleLong(idheader.ident);
|
||||
idheader.version = LittleLong(idheader.version);
|
||||
//QuakeLive BSP file
|
||||
if (idheader.ident == QL_BSP_IDENT && idheader.version == QL_BSP_VERSION)
|
||||
{
|
||||
ResetMapLoading();
|
||||
Q3_LoadMapFromBSP(qf);
|
||||
Q3_FreeMaxBSP();
|
||||
} //end if
|
||||
//Quake3 BSP file
|
||||
if (idheader.ident == Q3_BSP_IDENT && idheader.version == Q3_BSP_VERSION)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -205,6 +205,13 @@ typedef struct {
|
|||
|
||||
#define Q3_BSP_VERSION 46
|
||||
|
||||
// quick fix for creating aas files for ql bsp's.
|
||||
// (later this will probably need to be seperated, if we plan to add further support for ql)
|
||||
#define QL_BSP_IDENT (('P'<<24)+('S'<<16)+('B'<<8)+'I')
|
||||
// little-endian "IBSP"
|
||||
|
||||
#define QL_BSP_VERSION 47
|
||||
// ***********************************************************
|
||||
|
||||
// there shouldn't be any problem with increasing these values at the
|
||||
// expense of more memory allocation in the utilities
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user