24 Aug 2017
This commit is contained in:
parent
b11b79d08a
commit
3f4827918e
|
@ -1027,7 +1027,7 @@ void R_AliasLighting( float *lv, const vec3_t normal )
|
||||||
|
|
||||||
illum += g_alias.shadelight;
|
illum += g_alias.shadelight;
|
||||||
|
|
||||||
r = r_studio_lambert->value;
|
r = SHADE_LAMBERT;
|
||||||
|
|
||||||
// do modified hemispherical lighting
|
// do modified hemispherical lighting
|
||||||
if( r <= 1.0f )
|
if( r <= 1.0f )
|
||||||
|
|
|
@ -38,6 +38,7 @@ extern byte *r_temppool;
|
||||||
#define MAX_DECAL_SURFS 4096
|
#define MAX_DECAL_SURFS 4096
|
||||||
|
|
||||||
#define SHADEDOT_QUANT 16 // precalculated dot products for quantized angles
|
#define SHADEDOT_QUANT 16 // precalculated dot products for quantized angles
|
||||||
|
#define SHADE_LAMBERT 1.495f
|
||||||
|
|
||||||
// refparams
|
// refparams
|
||||||
#define RP_NONE 0
|
#define RP_NONE 0
|
||||||
|
|
|
@ -105,7 +105,6 @@ typedef struct
|
||||||
} studio_draw_state_t;
|
} studio_draw_state_t;
|
||||||
|
|
||||||
// studio-related cvars
|
// studio-related cvars
|
||||||
convar_t *r_studio_lambert;
|
|
||||||
convar_t *r_studio_sort_textures;
|
convar_t *r_studio_sort_textures;
|
||||||
convar_t *r_drawviewmodel;
|
convar_t *r_drawviewmodel;
|
||||||
convar_t *cl_righthand = NULL;
|
convar_t *cl_righthand = NULL;
|
||||||
|
@ -133,7 +132,6 @@ R_StudioInit
|
||||||
*/
|
*/
|
||||||
void R_StudioInit( void )
|
void R_StudioInit( void )
|
||||||
{
|
{
|
||||||
r_studio_lambert = Cvar_Get( "r_studio_lambert", "1.5", FCVAR_ARCHIVE, "half-lambert value" );
|
|
||||||
cl_himodels = Cvar_Get( "cl_himodels", "1", FCVAR_ARCHIVE, "draw high-resolution player models in multiplayer" );
|
cl_himodels = Cvar_Get( "cl_himodels", "1", FCVAR_ARCHIVE, "draw high-resolution player models in multiplayer" );
|
||||||
r_studio_sort_textures = Cvar_Get( "r_studio_sort_textures", "0", FCVAR_ARCHIVE, "change draw order for additive meshes" );
|
r_studio_sort_textures = Cvar_Get( "r_studio_sort_textures", "0", FCVAR_ARCHIVE, "change draw order for additive meshes" );
|
||||||
r_drawviewmodel = Cvar_Get( "r_drawviewmodel", "1", 0, "draw firstperson weapon model" );
|
r_drawviewmodel = Cvar_Get( "r_drawviewmodel", "1", 0, "draw firstperson weapon model" );
|
||||||
|
@ -1973,7 +1971,7 @@ void R_StudioLighting( float *lv, int bone, int flags, vec3_t normal )
|
||||||
|
|
||||||
illum += g_studio.shadelight;
|
illum += g_studio.shadelight;
|
||||||
|
|
||||||
r = r_studio_lambert->value;
|
r = SHADE_LAMBERT;
|
||||||
|
|
||||||
// do modified hemispherical lighting
|
// do modified hemispherical lighting
|
||||||
if( r <= 1.0f )
|
if( r <= 1.0f )
|
||||||
|
|
|
@ -227,7 +227,6 @@ void Cbuf_ExecStuffCmds( void )
|
||||||
// no reason to run the commandline arguments twice
|
// no reason to run the commandline arguments twice
|
||||||
if( !host.stuffcmds_pending )
|
if( !host.stuffcmds_pending )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
build[0] = 0;
|
build[0] = 0;
|
||||||
|
|
||||||
for( i = 0; i < host.argc; i++ )
|
for( i = 0; i < host.argc; i++ )
|
||||||
|
|
|
@ -117,7 +117,7 @@ static void FS_InitMemory( void );
|
||||||
const char *FS_FileExtension( const char *in );
|
const char *FS_FileExtension( const char *in );
|
||||||
static searchpath_t *FS_FindFile( const char *name, int *index, qboolean gamedironly );
|
static searchpath_t *FS_FindFile( const char *name, int *index, qboolean gamedironly );
|
||||||
static dlumpinfo_t *W_FindLump( wfile_t *wad, const char *name, const char matchtype );
|
static dlumpinfo_t *W_FindLump( wfile_t *wad, const char *name, const char matchtype );
|
||||||
static dpackfile_t* FS_AddFileToPack( const char* name, pack_t *pack, long offset, long size );
|
static dpackfile_t *FS_AddFileToPack( const char* name, pack_t *pack, long offset, long size );
|
||||||
static byte *W_LoadFile( const char *path, long *filesizeptr, qboolean gamedironly );
|
static byte *W_LoadFile( const char *path, long *filesizeptr, qboolean gamedironly );
|
||||||
static qboolean FS_SysFileExists( const char *path );
|
static qboolean FS_SysFileExists( const char *path );
|
||||||
static qboolean FS_SysFolderExists( const char *path );
|
static qboolean FS_SysFolderExists( const char *path );
|
||||||
|
@ -261,6 +261,7 @@ void listdirectory( stringlist_t *list, const char *path )
|
||||||
|
|
||||||
// start a new chain with the the first name
|
// start a new chain with the the first name
|
||||||
stringlistappend( list, n_file.name );
|
stringlistappend( list, n_file.name );
|
||||||
|
|
||||||
// iterate through the directory
|
// iterate through the directory
|
||||||
while( _findnext( hFile, &n_file ) == 0 )
|
while( _findnext( hFile, &n_file ) == 0 )
|
||||||
stringlistappend( list, n_file.name );
|
stringlistappend( list, n_file.name );
|
||||||
|
@ -288,7 +289,7 @@ FS_AddFileToPack
|
||||||
Add a file to the list of files contained into a package
|
Add a file to the list of files contained into a package
|
||||||
====================
|
====================
|
||||||
*/
|
*/
|
||||||
static dpackfile_t* FS_AddFileToPack( const char* name, pack_t* pack, long offset, long size )
|
static dpackfile_t *FS_AddFileToPack( const char *name, pack_t *pack, long offset, long size )
|
||||||
{
|
{
|
||||||
int left, right, middle;
|
int left, right, middle;
|
||||||
dpackfile_t *pfile;
|
dpackfile_t *pfile;
|
||||||
|
@ -296,6 +297,7 @@ static dpackfile_t* FS_AddFileToPack( const char* name, pack_t* pack, long offse
|
||||||
// look for the slot we should put that file into (binary search)
|
// look for the slot we should put that file into (binary search)
|
||||||
left = 0;
|
left = 0;
|
||||||
right = pack->numfiles - 1;
|
right = pack->numfiles - 1;
|
||||||
|
|
||||||
while( left <= right )
|
while( left <= right )
|
||||||
{
|
{
|
||||||
int diff;
|
int diff;
|
||||||
|
@ -334,7 +336,7 @@ void FS_CreatePath( char *path )
|
||||||
{
|
{
|
||||||
char *ofs, save;
|
char *ofs, save;
|
||||||
|
|
||||||
for( ofs = path+1; *ofs; ofs++ )
|
for( ofs = path + 1; *ofs; ofs++ )
|
||||||
{
|
{
|
||||||
if( *ofs == '/' || *ofs == '\\' )
|
if( *ofs == '/' || *ofs == '\\' )
|
||||||
{
|
{
|
||||||
|
@ -408,7 +410,6 @@ void FS_FileBase( const char *in, char *out )
|
||||||
end = len-1; // no '.', copy to end
|
end = len-1; // no '.', copy to end
|
||||||
else end--; // found ',', copy to left of '.'
|
else end--; // found ',', copy to left of '.'
|
||||||
|
|
||||||
|
|
||||||
// scan backward for '/'
|
// scan backward for '/'
|
||||||
start = len - 1;
|
start = len - 1;
|
||||||
|
|
||||||
|
@ -797,6 +798,7 @@ void FS_ClearSearchPath( void )
|
||||||
Mem_Free( search->pack->files );
|
Mem_Free( search->pack->files );
|
||||||
Mem_Free( search->pack );
|
Mem_Free( search->pack );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( search->wad )
|
if( search->wad )
|
||||||
{
|
{
|
||||||
W_Close( search->wad );
|
W_Close( search->wad );
|
||||||
|
@ -1555,7 +1557,7 @@ FS_SysOpen
|
||||||
Internal function used to create a file_t and open the relevant non-packed file on disk
|
Internal function used to create a file_t and open the relevant non-packed file on disk
|
||||||
====================
|
====================
|
||||||
*/
|
*/
|
||||||
static file_t* FS_SysOpen( const char* filepath, const char* mode )
|
static file_t *FS_SysOpen( const char *filepath, const char *mode )
|
||||||
{
|
{
|
||||||
file_t *file;
|
file_t *file;
|
||||||
int mod, opt;
|
int mod, opt;
|
||||||
|
@ -1606,6 +1608,7 @@ static file_t* FS_SysOpen( const char* filepath, const char* mode )
|
||||||
file->ungetc = EOF;
|
file->ungetc = EOF;
|
||||||
|
|
||||||
file->handle = open( filepath, mod|opt, 0666 );
|
file->handle = open( filepath, mod|opt, 0666 );
|
||||||
|
|
||||||
if( file->handle < 0 )
|
if( file->handle < 0 )
|
||||||
{
|
{
|
||||||
Mem_Free( file );
|
Mem_Free( file );
|
||||||
|
@ -1621,7 +1624,6 @@ static file_t* FS_SysOpen( const char* filepath, const char* mode )
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
===========
|
===========
|
||||||
FS_OpenPackedFile
|
FS_OpenPackedFile
|
||||||
|
@ -1697,7 +1699,7 @@ Return the searchpath where the file was found (or NULL)
|
||||||
and the file index in the package if relevant
|
and the file index in the package if relevant
|
||||||
====================
|
====================
|
||||||
*/
|
*/
|
||||||
static searchpath_t *FS_FindFile( const char *name, int* index, qboolean gamedironly )
|
static searchpath_t *FS_FindFile( const char *name, int *index, qboolean gamedironly )
|
||||||
{
|
{
|
||||||
searchpath_t *search;
|
searchpath_t *search;
|
||||||
char *pEnvPath;
|
char *pEnvPath;
|
||||||
|
@ -1773,6 +1775,7 @@ static searchpath_t *FS_FindFile( const char *name, int* index, qboolean gamedir
|
||||||
FS_FileBase( name, shortname );
|
FS_FileBase( name, shortname );
|
||||||
|
|
||||||
lump = W_FindLump( search->wad, shortname, type );
|
lump = W_FindLump( search->wad, shortname, type );
|
||||||
|
|
||||||
if( lump )
|
if( lump )
|
||||||
{
|
{
|
||||||
if( index )
|
if( index )
|
||||||
|
@ -1783,7 +1786,9 @@ static searchpath_t *FS_FindFile( const char *name, int* index, qboolean gamedir
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char netpath[MAX_SYSPATH];
|
char netpath[MAX_SYSPATH];
|
||||||
|
|
||||||
Q_sprintf( netpath, "%s%s", search->filename, name );
|
Q_sprintf( netpath, "%s%s", search->filename, name );
|
||||||
|
|
||||||
if( FS_SysFileExists( netpath ))
|
if( FS_SysFileExists( netpath ))
|
||||||
{
|
{
|
||||||
if( index != NULL ) *index = -1;
|
if( index != NULL ) *index = -1;
|
||||||
|
@ -1952,6 +1957,7 @@ long FS_Write( file_t *file, const void *data, size_t datasize )
|
||||||
// write the buffer and update the position
|
// write the buffer and update the position
|
||||||
result = write( file->handle, data, (long)datasize );
|
result = write( file->handle, data, (long)datasize );
|
||||||
file->position = lseek( file->handle, 0, SEEK_CUR );
|
file->position = lseek( file->handle, 0, SEEK_CUR );
|
||||||
|
|
||||||
if( file->real_length < file->position )
|
if( file->real_length < file->position )
|
||||||
file->real_length = file->position;
|
file->real_length = file->position;
|
||||||
|
|
||||||
|
@ -2062,7 +2068,7 @@ FS_Printf
|
||||||
Print a string into a file
|
Print a string into a file
|
||||||
====================
|
====================
|
||||||
*/
|
*/
|
||||||
int FS_Printf( file_t *file, const char* format, ... )
|
int FS_Printf( file_t *file, const char *format, ... )
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
va_list args;
|
va_list args;
|
||||||
|
@ -2081,7 +2087,7 @@ FS_VPrintf
|
||||||
Print a string into a file
|
Print a string into a file
|
||||||
====================
|
====================
|
||||||
*/
|
*/
|
||||||
int FS_VPrintf( file_t *file, const char* format, va_list ap )
|
int FS_VPrintf( file_t *file, const char *format, va_list ap )
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
long buff_size = MAX_SYSPATH;
|
long buff_size = MAX_SYSPATH;
|
||||||
|
@ -2118,7 +2124,7 @@ int FS_Getc( file_t *file )
|
||||||
{
|
{
|
||||||
char c;
|
char c;
|
||||||
|
|
||||||
if( FS_Read( file, &c, 1) != 1 )
|
if( FS_Read( file, &c, 1 ) != 1 )
|
||||||
return EOF;
|
return EOF;
|
||||||
|
|
||||||
return c;
|
return c;
|
||||||
|
@ -2155,8 +2161,10 @@ int FS_Gets( file_t *file, byte *string, size_t bufsize )
|
||||||
while( 1 )
|
while( 1 )
|
||||||
{
|
{
|
||||||
c = FS_Getc( file );
|
c = FS_Getc( file );
|
||||||
|
|
||||||
if( c == '\r' || c == '\n' || c < 0 )
|
if( c == '\r' || c == '\n' || c < 0 )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if( end < bufsize - 1 )
|
if( end < bufsize - 1 )
|
||||||
string[end++] = c;
|
string[end++] = c;
|
||||||
}
|
}
|
||||||
|
@ -2166,6 +2174,7 @@ int FS_Gets( file_t *file, byte *string, size_t bufsize )
|
||||||
if( c == '\r' )
|
if( c == '\r' )
|
||||||
{
|
{
|
||||||
c = FS_Getc( file );
|
c = FS_Getc( file );
|
||||||
|
|
||||||
if( c != '\n' )
|
if( c != '\n' )
|
||||||
FS_UnGetc( file, (byte)c );
|
FS_UnGetc( file, (byte)c );
|
||||||
}
|
}
|
||||||
|
@ -2224,7 +2233,7 @@ FS_Tell
|
||||||
Give the current position in a file
|
Give the current position in a file
|
||||||
====================
|
====================
|
||||||
*/
|
*/
|
||||||
long FS_Tell( file_t* file )
|
long FS_Tell( file_t *file )
|
||||||
{
|
{
|
||||||
if( !file ) return 0;
|
if( !file ) return 0;
|
||||||
return file->position - file->buff_len + file->buff_ind;
|
return file->position - file->buff_len + file->buff_ind;
|
||||||
|
@ -2237,7 +2246,7 @@ FS_Eof
|
||||||
indicates at reached end of file
|
indicates at reached end of file
|
||||||
====================
|
====================
|
||||||
*/
|
*/
|
||||||
qboolean FS_Eof( file_t* file )
|
qboolean FS_Eof( file_t *file )
|
||||||
{
|
{
|
||||||
if( !file ) return true;
|
if( !file ) return true;
|
||||||
return (( file->position - file->buff_len + file->buff_ind ) == file->real_length ) ? true : false;
|
return (( file->position - file->buff_len + file->buff_ind ) == file->real_length ) ? true : false;
|
||||||
|
@ -2250,7 +2259,7 @@ FS_Purge
|
||||||
Erases any buffered input or output data
|
Erases any buffered input or output data
|
||||||
====================
|
====================
|
||||||
*/
|
*/
|
||||||
void FS_Purge( file_t* file )
|
void FS_Purge( file_t *file )
|
||||||
{
|
{
|
||||||
file->buff_len = 0;
|
file->buff_len = 0;
|
||||||
file->buff_ind = 0;
|
file->buff_ind = 0;
|
||||||
|
@ -2359,6 +2368,7 @@ void FS_StripExtension( char *path )
|
||||||
if( path[length] == '/' || path[length] == '\\' || path[length] == ':' )
|
if( path[length] == '/' || path[length] == '\\' || path[length] == ':' )
|
||||||
return; // no extension
|
return; // no extension
|
||||||
}
|
}
|
||||||
|
|
||||||
if( length ) path[length] = 0;
|
if( length ) path[length] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2381,6 +2391,7 @@ void FS_DefaultExtension( char *path, const char *extension )
|
||||||
if( *src == '.' ) return;
|
if( *src == '.' ) return;
|
||||||
src--;
|
src--;
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_strcat( path, extension );
|
Q_strcat( path, extension );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2540,6 +2551,7 @@ long FS_FileSize( const char *filename, qboolean gamedironly )
|
||||||
length = FS_Tell( fp );
|
length = FS_Tell( fp );
|
||||||
FS_Close( fp );
|
FS_Close( fp );
|
||||||
}
|
}
|
||||||
|
|
||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2583,6 +2595,7 @@ long FS_FileTime( const char *filename, qboolean gamedironly )
|
||||||
Q_sprintf( path, "%s%s", search->filename, filename );
|
Q_sprintf( path, "%s%s", search->filename, filename );
|
||||||
return FS_SysFileTime( path );
|
return FS_SysFileTime( path );
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1; // doesn't exist
|
return -1; // doesn't exist
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2736,6 +2749,7 @@ search_t *FS_Search( const char *pattern, int caseinsensitive, int gamedironly )
|
||||||
if( resultlistindex == resultlist.numstrings )
|
if( resultlistindex == resultlist.numstrings )
|
||||||
stringlistappend( &resultlist, temp );
|
stringlistappend( &resultlist, temp );
|
||||||
}
|
}
|
||||||
|
|
||||||
// strip off one path element at a time until empty
|
// strip off one path element at a time until empty
|
||||||
// this way directories are added to the listing if they match the pattern
|
// this way directories are added to the listing if they match the pattern
|
||||||
slash = Q_strrchr( temp, '/' );
|
slash = Q_strrchr( temp, '/' );
|
||||||
|
@ -2783,6 +2797,7 @@ search_t *FS_Search( const char *pattern, int caseinsensitive, int gamedironly )
|
||||||
|
|
||||||
// look through all the wad file elements
|
// look through all the wad file elements
|
||||||
wad = searchpath->wad;
|
wad = searchpath->wad;
|
||||||
|
|
||||||
for( i = 0; i < wad->numlumps; i++ )
|
for( i = 0; i < wad->numlumps; i++ )
|
||||||
{
|
{
|
||||||
// if type not matching, we already have no chance ...
|
// if type not matching, we already have no chance ...
|
||||||
|
@ -2833,9 +2848,11 @@ search_t *FS_Search( const char *pattern, int caseinsensitive, int gamedironly )
|
||||||
Q_sprintf( netpath, "%s%s", searchpath->filename, basepath );
|
Q_sprintf( netpath, "%s%s", searchpath->filename, basepath );
|
||||||
stringlistinit( &dirlist );
|
stringlistinit( &dirlist );
|
||||||
listdirectory( &dirlist, netpath );
|
listdirectory( &dirlist, netpath );
|
||||||
|
|
||||||
for( dirlistindex = 0; dirlistindex < dirlist.numstrings; dirlistindex++ )
|
for( dirlistindex = 0; dirlistindex < dirlist.numstrings; dirlistindex++ )
|
||||||
{
|
{
|
||||||
Q_sprintf( temp, "%s%s", basepath, dirlist.strings[dirlistindex] );
|
Q_sprintf( temp, "%s%s", basepath, dirlist.strings[dirlistindex] );
|
||||||
|
|
||||||
if( matchpattern( temp, (char *)pattern, true ))
|
if( matchpattern( temp, (char *)pattern, true ))
|
||||||
{
|
{
|
||||||
for( resultlistindex = 0; resultlistindex < resultlist.numstrings; resultlistindex++ )
|
for( resultlistindex = 0; resultlistindex < resultlist.numstrings; resultlistindex++ )
|
||||||
|
@ -3159,6 +3176,7 @@ byte *W_ReadLump( wfile_t *wad, dlumpinfo_t *lump, long *lumpsizeptr )
|
||||||
|
|
||||||
buf = (byte *)Mem_Alloc( wad->mempool, lump->disksize );
|
buf = (byte *)Mem_Alloc( wad->mempool, lump->disksize );
|
||||||
size = FS_Read( wad->handle, buf, lump->disksize );
|
size = FS_Read( wad->handle, buf, lump->disksize );
|
||||||
|
|
||||||
if( size < lump->disksize )
|
if( size < lump->disksize )
|
||||||
{
|
{
|
||||||
MsgDev( D_WARN, "W_ReadLump: %s is probably corrupted\n", lump->name );
|
MsgDev( D_WARN, "W_ReadLump: %s is probably corrupted\n", lump->name );
|
||||||
|
|
|
@ -59,7 +59,7 @@ int Host_CompareFileTime( long ft1, long ft2 )
|
||||||
|
|
||||||
void Host_ShutdownServer( void )
|
void Host_ShutdownServer( void )
|
||||||
{
|
{
|
||||||
if( !SV_Active()) return;
|
if( !SV_Active( )) return;
|
||||||
Q_strncpy( host.finalmsg, "Server was killed", MAX_STRING );
|
Q_strncpy( host.finalmsg, "Server was killed", MAX_STRING );
|
||||||
SV_Shutdown( false );
|
SV_Shutdown( false );
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@ void Host_EndGame( const char *message, ... )
|
||||||
|
|
||||||
MsgDev( D_INFO, "Host_EndGame: %s\n", string );
|
MsgDev( D_INFO, "Host_EndGame: %s\n", string );
|
||||||
|
|
||||||
if( SV_Active())
|
if( SV_Active( ))
|
||||||
{
|
{
|
||||||
Q_snprintf( host.finalmsg, sizeof( host.finalmsg ), "Host_EndGame: %s", string );
|
Q_snprintf( host.finalmsg, sizeof( host.finalmsg ), "Host_EndGame: %s", string );
|
||||||
SV_Shutdown( false );
|
SV_Shutdown( false );
|
||||||
|
@ -894,7 +894,7 @@ void Host_InitCommon( const char *hostname, qboolean bChangeGame )
|
||||||
|
|
||||||
// share developer level across all dlls
|
// share developer level across all dlls
|
||||||
Q_snprintf( dev_level, sizeof( dev_level ), "%i", host.developer );
|
Q_snprintf( dev_level, sizeof( dev_level ), "%i", host.developer );
|
||||||
Cvar_Get( "developer", dev_level, 0, "current developer level" );
|
Cvar_Get( "developer", dev_level, FCVAR_READ_ONLY, "current developer level" );
|
||||||
Cmd_AddCommand( "exec", Host_Exec_f, "execute a script file" );
|
Cmd_AddCommand( "exec", Host_Exec_f, "execute a script file" );
|
||||||
Cmd_AddCommand( "memlist", Host_MemStats_f, "prints memory pool information" );
|
Cmd_AddCommand( "memlist", Host_MemStats_f, "prints memory pool information" );
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
--------------------Configuration: engine - Win32 Release--------------------
|
--------------------Configuration: engine - Win32 Release--------------------
|
||||||
</h3>
|
</h3>
|
||||||
<h3>Command Lines</h3>
|
<h3>Command Lines</h3>
|
||||||
Creating temporary file "C:\WINDOWS\TEMP\RSP6457.bat" with contents
|
Creating temporary file "C:\WINDOWS\TEMP\RSP6975.bat" with contents
|
||||||
[
|
[
|
||||||
@echo off
|
@echo off
|
||||||
copy \Xash3D\src_main\temp\engine\!release\xash.dll "D:\Xash3D\xash.dll"
|
copy \Xash3D\src_main\temp\engine\!release\xash.dll "D:\Xash3D\xash.dll"
|
||||||
|
@ -14,7 +14,7 @@ copy \Xash3D\src_main\temp\engine\!release\xash.dll "D:\Paranoia2\xash.dll"
|
||||||
copy \Xash3D\src_main\temp\engine\!release\xash.dll "D:\Area51\xash.dll"
|
copy \Xash3D\src_main\temp\engine\!release\xash.dll "D:\Area51\xash.dll"
|
||||||
copy \Xash3D\src_main\temp\engine\!release\xash.dll "D:\Quake\xash.dll"
|
copy \Xash3D\src_main\temp\engine\!release\xash.dll "D:\Quake\xash.dll"
|
||||||
]
|
]
|
||||||
Creating command line "C:\WINDOWS\TEMP\RSP6457.bat"
|
Creating command line "C:\WINDOWS\TEMP\RSP6975.bat"
|
||||||
<h3>Output Window</h3>
|
<h3>Output Window</h3>
|
||||||
Performing Custom Build Step on \Xash3D\src_main\temp\engine\!release\xash.dll
|
Performing Custom Build Step on \Xash3D\src_main\temp\engine\!release\xash.dll
|
||||||
‘ª®¯¨à®¢ ® ä ©«®¢: 1.
|
‘ª®¯¨à®¢ ® ä ©«®¢: 1.
|
||||||
|
|
|
@ -417,6 +417,8 @@ extern convar_t sv_skyname;
|
||||||
extern convar_t sv_skyspeed;
|
extern convar_t sv_skyspeed;
|
||||||
extern convar_t sv_skyangle;
|
extern convar_t sv_skyangle;
|
||||||
extern convar_t sv_consistency;
|
extern convar_t sv_consistency;
|
||||||
|
extern convar_t sv_spawntime;
|
||||||
|
extern convar_t sv_changetime;
|
||||||
extern convar_t deathmatch;
|
extern convar_t deathmatch;
|
||||||
extern convar_t skill;
|
extern convar_t skill;
|
||||||
extern convar_t coop;
|
extern convar_t coop;
|
||||||
|
|
|
@ -310,14 +310,21 @@ void SV_ActivateServer( void )
|
||||||
// Activate the DLL server code
|
// Activate the DLL server code
|
||||||
svgame.dllFuncs.pfnServerActivate( svgame.edicts, svgame.numEntities, svgame.globals->maxClients );
|
svgame.dllFuncs.pfnServerActivate( svgame.edicts, svgame.numEntities, svgame.globals->maxClients );
|
||||||
|
|
||||||
numFrames = (sv.loadgame) ? 1 : 2;
|
if( sv.loadgame || svgame.globals->changelevel )
|
||||||
if( !sv.loadgame || svgame.globals->changelevel )
|
{
|
||||||
|
sv.frametime = bound( 0.001, sv_changetime.value, 0.1 );
|
||||||
|
numFrames = 1;
|
||||||
|
}
|
||||||
|
else if( svs.maxclients <= 1 )
|
||||||
|
{
|
||||||
|
sv.frametime = bound( 0.1, sv_spawntime.value, 0.8 );
|
||||||
|
numFrames = 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
sv.frametime = 0.1f;
|
sv.frametime = 0.1f;
|
||||||
|
numFrames = 8;
|
||||||
// GoldSrc rules
|
}
|
||||||
// NOTE: this stuff is breaking sound from func_rotating in multiplayer
|
|
||||||
// e.g. ambience\boomer.wav on snark_pit.bsp
|
|
||||||
numFrames *= Q_min( svs.maxclients, 8 );
|
|
||||||
|
|
||||||
// run some frames to allow everything to settle
|
// run some frames to allow everything to settle
|
||||||
for( i = 0; i < numFrames; i++ )
|
for( i = 0; i < numFrames; i++ )
|
||||||
|
|
|
@ -95,6 +95,9 @@ CVAR_DEFINE_AUTO( sv_skydir_z, "1", FCVAR_MOVEVARS|FCVAR_UNLOGGED, "sky rotation
|
||||||
CVAR_DEFINE_AUTO( sv_skyangle, "0", FCVAR_MOVEVARS|FCVAR_UNLOGGED, "skybox rotational angle (in degrees)" );
|
CVAR_DEFINE_AUTO( sv_skyangle, "0", FCVAR_MOVEVARS|FCVAR_UNLOGGED, "skybox rotational angle (in degrees)" );
|
||||||
CVAR_DEFINE_AUTO( sv_skyspeed, "0", 0, "skybox rotational speed" );
|
CVAR_DEFINE_AUTO( sv_skyspeed, "0", 0, "skybox rotational speed" );
|
||||||
|
|
||||||
|
CVAR_DEFINE( sv_spawntime, "host_spawntime", "0.8", FCVAR_ARCHIVE, "host.frametime on spawn new map (force to 0.1 if have problems or crashes)" );
|
||||||
|
CVAR_DEFINE( sv_changetime, "host_changetime", "0.001", FCVAR_ARCHIVE, "host.frametime on changelevel (force to 0.1 if have player stucks)" );
|
||||||
|
|
||||||
// obsolete cvars which we should keep because game DLL's will be relies on it
|
// obsolete cvars which we should keep because game DLL's will be relies on it
|
||||||
CVAR_DEFINE_AUTO( showtriggers, "0", FCVAR_LATCH, "debug cvar shows triggers" );
|
CVAR_DEFINE_AUTO( showtriggers, "0", FCVAR_LATCH, "debug cvar shows triggers" );
|
||||||
CVAR_DEFINE_AUTO( sv_airmove, "1", FCVAR_SERVER, "obsolete, compatibility issues" );
|
CVAR_DEFINE_AUTO( sv_airmove, "1", FCVAR_SERVER, "obsolete, compatibility issues" );
|
||||||
|
@ -779,6 +782,9 @@ void SV_Init( void )
|
||||||
sv_novis = Cvar_Get( "sv_novis", "0", 0, "force to ignore server visibility" );
|
sv_novis = Cvar_Get( "sv_novis", "0", 0, "force to ignore server visibility" );
|
||||||
sv_hostmap = Cvar_Get( "hostmap", GI->startmap, 0, "keep name of last entered map" );
|
sv_hostmap = Cvar_Get( "hostmap", GI->startmap, 0, "keep name of last entered map" );
|
||||||
|
|
||||||
|
Cvar_RegisterVariable (&sv_spawntime);
|
||||||
|
Cvar_RegisterVariable (&sv_changetime);
|
||||||
|
|
||||||
Cvar_RegisterVariable (&violence_ablood);
|
Cvar_RegisterVariable (&violence_ablood);
|
||||||
Cvar_RegisterVariable (&violence_hblood);
|
Cvar_RegisterVariable (&violence_hblood);
|
||||||
Cvar_RegisterVariable (&violence_agibs);
|
Cvar_RegisterVariable (&violence_agibs);
|
||||||
|
|
|
@ -780,7 +780,7 @@ SV_PushEntity
|
||||||
Does not change the entities velocity at all
|
Does not change the entities velocity at all
|
||||||
============
|
============
|
||||||
*/
|
*/
|
||||||
trace_t SV_PushEntity( edict_t *ent, const vec3_t lpush, const vec3_t apush, int *blocked )
|
trace_t SV_PushEntity( edict_t *ent, const vec3_t lpush, const vec3_t apush, int *blocked, float flDamage )
|
||||||
{
|
{
|
||||||
trace_t trace;
|
trace_t trace;
|
||||||
qboolean monsterClip;
|
qboolean monsterClip;
|
||||||
|
@ -818,7 +818,7 @@ trace_t SV_PushEntity( edict_t *ent, const vec3_t lpush, const vec3_t apush, int
|
||||||
if( blocked )
|
if( blocked )
|
||||||
{
|
{
|
||||||
// more accuracy blocking code
|
// more accuracy blocking code
|
||||||
if( FBitSet( host.features, ENGINE_PHYSICS_PUSHER_EXT ))
|
if( flDamage <= 0.0f )
|
||||||
*blocked = !VectorCompare( ent->v.origin, end ); // can't move full distance
|
*blocked = !VectorCompare( ent->v.origin, end ); // can't move full distance
|
||||||
else *blocked = true;
|
else *blocked = true;
|
||||||
}
|
}
|
||||||
|
@ -966,7 +966,7 @@ static edict_t *SV_PushMove( edict_t *pusher, float movetime )
|
||||||
|
|
||||||
// try moving the contacted entity
|
// try moving the contacted entity
|
||||||
pusher->v.solid = SOLID_NOT;
|
pusher->v.solid = SOLID_NOT;
|
||||||
SV_PushEntity( check, lmove, vec3_origin, &block );
|
SV_PushEntity( check, lmove, vec3_origin, &block, pusher->v.dmg );
|
||||||
pusher->v.solid = oldsolid;
|
pusher->v.solid = oldsolid;
|
||||||
|
|
||||||
// if it is still inside the pusher, block
|
// if it is still inside the pusher, block
|
||||||
|
@ -1099,7 +1099,7 @@ static edict_t *SV_PushRotate( edict_t *pusher, float movetime )
|
||||||
|
|
||||||
// try moving the contacted entity
|
// try moving the contacted entity
|
||||||
pusher->v.solid = SOLID_NOT;
|
pusher->v.solid = SOLID_NOT;
|
||||||
SV_PushEntity( check, lmove, amove, &block );
|
SV_PushEntity( check, lmove, amove, &block, pusher->v.dmg );
|
||||||
pusher->v.solid = oldsolid;
|
pusher->v.solid = oldsolid;
|
||||||
|
|
||||||
// pushed entity blocked by wall
|
// pushed entity blocked by wall
|
||||||
|
@ -1487,7 +1487,7 @@ void SV_Physics_Toss( edict_t *ent )
|
||||||
|
|
||||||
VectorSubtract( ent->v.velocity, ent->v.basevelocity, ent->v.velocity );
|
VectorSubtract( ent->v.velocity, ent->v.basevelocity, ent->v.velocity );
|
||||||
|
|
||||||
trace = SV_PushEntity( ent, move, vec3_origin, NULL );
|
trace = SV_PushEntity( ent, move, vec3_origin, NULL, 0.0f );
|
||||||
if( ent->free ) return;
|
if( ent->free ) return;
|
||||||
|
|
||||||
SV_CheckVelocity( ent );
|
SV_CheckVelocity( ent );
|
||||||
|
@ -1541,7 +1541,7 @@ void SV_Physics_Toss( edict_t *ent )
|
||||||
{
|
{
|
||||||
VectorScale( ent->v.velocity, (1.0f - trace.fraction) * sv.frametime * 0.9f, move );
|
VectorScale( ent->v.velocity, (1.0f - trace.fraction) * sv.frametime * 0.9f, move );
|
||||||
VectorMA( move, (1.0f - trace.fraction) * sv.frametime * 0.9f, ent->v.basevelocity, move );
|
VectorMA( move, (1.0f - trace.fraction) * sv.frametime * 0.9f, ent->v.basevelocity, move );
|
||||||
trace = SV_PushEntity( ent, move, vec3_origin, NULL );
|
trace = SV_PushEntity( ent, move, vec3_origin, NULL, 0.0f );
|
||||||
if( ent->free ) return;
|
if( ent->free ) return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue