15 Jan 2015
This commit is contained in:
parent
86d09135a4
commit
2ebfb437c9
|
@ -1,3 +1,8 @@
|
|||
build 2900
|
||||
|
||||
Console: add detection for Paranoia 2 maps (show message in console)
|
||||
Engine: fix playing video when fps_max is 0 and framerate too high
|
||||
|
||||
build 2867
|
||||
|
||||
Client: another extension for EventAPI: function EV_SoundForIndex to get soundpath from soundindex
|
||||
|
|
|
@ -30,6 +30,9 @@ BRUSH MODELS
|
|||
#define HLBSP_VERSION 30 // half-life regular version
|
||||
#define XTBSP_VERSION 31 // extended lightmaps and expanded clipnodes limit
|
||||
|
||||
#define IDEXTRAHEADER (('H'<<24)+('S'<<16)+('A'<<8)+'X') // little-endian "XASH"
|
||||
#define EXTRA_VERSION 2 // because version 1 was occupied by old versions of XashXT
|
||||
|
||||
#define DELUXEMAP_VERSION 1
|
||||
#define IDDELUXEMAPHEADER (('T'<<24)+('I'<<16)+('L'<<8)+'Q') // little-endian "QLIT"
|
||||
|
||||
|
@ -98,6 +101,13 @@ BRUSH MODELS
|
|||
// version 31
|
||||
#define LUMP_CLIPNODES2 15 // hull0 goes into LUMP_NODES, hull1 goes into LUMP_CLIPNODES,
|
||||
#define LUMP_CLIPNODES3 16 // hull2 goes into LUMP_CLIPNODES2, hull3 goes into LUMP_CLIPNODES3
|
||||
#define HEADER_LUMPS_31 17
|
||||
|
||||
#define LUMP_FACES_EXTRADATA 0 // extension of dface_t
|
||||
#define LUMP_VERTS_EXTRADATA 1 // extension of dvertex_t
|
||||
#define LUMP_CUBEMAPS 2 // cubemap description
|
||||
|
||||
#define EXTRA_LUMPS 8 // g-cont. just for future expansions
|
||||
|
||||
// texture flags
|
||||
#define TEX_SPECIAL BIT( 0 ) // sky or slime, no lightmap or 256 subdivision
|
||||
|
@ -128,6 +138,19 @@ typedef struct
|
|||
dlump_t lumps[HEADER_LUMPS];
|
||||
} dheader_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int version;
|
||||
dlump_t lumps[HEADER_LUMPS_31];
|
||||
} dheader31_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int id; // must be little endian XASH
|
||||
int version;
|
||||
dlump_t lumps[EXTRA_LUMPS];
|
||||
} dextrahdr_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
vec3_t mins;
|
||||
|
|
|
@ -48,6 +48,6 @@ int Q_buildnum( void )
|
|||
|
||||
return b;
|
||||
#else
|
||||
return 2867;
|
||||
return 2900;
|
||||
#endif
|
||||
}
|
|
@ -92,7 +92,7 @@ typedef enum
|
|||
#define MAX_FPS 500.0 // upper limit for maxfps.
|
||||
|
||||
#define MAX_FRAMETIME 0.1
|
||||
#define MIN_FRAMETIME 0.001
|
||||
#define MIN_FRAMETIME 0.000001
|
||||
|
||||
#define MAX_CMD_TOKENS 80 // cmd tokens
|
||||
#define MAX_ENTNUMBER 99999 // for server and client parsing
|
||||
|
|
|
@ -67,6 +67,7 @@ qboolean Cmd_GetMapList( const char *s, char *completedname, int length )
|
|||
int ver = -1, mapver = -1, lumpofs = 0, lumplen = 0;
|
||||
const char *ext = FS_FileExtension( t->filenames[i] );
|
||||
char *ents = NULL, *pfile;
|
||||
qboolean paranoia = false;
|
||||
qboolean gearbox = false;
|
||||
|
||||
if( Q_stricmp( ext, "bsp" )) continue;
|
||||
|
@ -75,12 +76,13 @@ qboolean Cmd_GetMapList( const char *s, char *completedname, int length )
|
|||
|
||||
if( f )
|
||||
{
|
||||
dheader_t *header, tmphdr;
|
||||
dheader_t *header;
|
||||
dextrahdr_t *hdrext;
|
||||
|
||||
Q_memset( &tmphdr, 0, sizeof( tmphdr ));
|
||||
FS_Read( f, &tmphdr, sizeof( tmphdr ));
|
||||
ver = tmphdr.version;
|
||||
header = &tmphdr;
|
||||
Q_memset( buf, 0, sizeof( buf ));
|
||||
FS_Read( f, buf, sizeof( buf ));
|
||||
header = (dheader_t *)buf;
|
||||
ver = header->version;
|
||||
|
||||
switch( ver )
|
||||
{
|
||||
|
@ -102,6 +104,13 @@ qboolean Cmd_GetMapList( const char *s, char *completedname, int length )
|
|||
break;
|
||||
}
|
||||
|
||||
if( ver == XTBSP_VERSION )
|
||||
hdrext = (dextrahdr_t *)((byte *)buf + sizeof( dheader31_t ));
|
||||
else hdrext = (dextrahdr_t *)((byte *)buf + sizeof( dheader_t ));
|
||||
|
||||
if( hdrext->id == IDEXTRAHEADER && hdrext->version == EXTRA_VERSION )
|
||||
paranoia = true;
|
||||
|
||||
Q_strncpy( entfilename, t->filenames[i], sizeof( entfilename ));
|
||||
FS_StripExtension( entfilename );
|
||||
FS_DefaultExtension( entfilename, ".ent" );
|
||||
|
@ -154,10 +163,12 @@ qboolean Cmd_GetMapList( const char *s, char *completedname, int length )
|
|||
break;
|
||||
case HLBSP_VERSION:
|
||||
if( gearbox ) Q_strncpy( buf, "Blue-Shift", sizeof( buf ));
|
||||
else if( paranoia ) Q_strncpy( buf, "Paranoia 2", sizeof( buf ));
|
||||
else Q_strncpy( buf, "Half-Life", sizeof( buf ));
|
||||
break;
|
||||
case XTBSP_VERSION:
|
||||
Q_strncpy( buf, "Xash3D", sizeof( buf ));
|
||||
if( paranoia ) Q_strncpy( buf, "Paranoia 2", sizeof( buf ));
|
||||
else Q_strncpy( buf, "Xash3D", sizeof( buf ));
|
||||
break;
|
||||
default: Q_strncpy( buf, "??", sizeof( buf )); break;
|
||||
}
|
||||
|
|
Reference in New Issue