Apply 4143 update
This commit is contained in:
parent
814b7eda07
commit
a539384a76
19 changed files with 75 additions and 40 deletions
|
@ -1211,6 +1211,7 @@ static qboolean CL_LoadHudSprite( const char *szSpriteName, model_t *m_pSprite,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Con_Printf( S_ERROR "%s couldn't load\n", szSpriteName );
|
||||||
Mod_UnloadSpriteModel( m_pSprite );
|
Mod_UnloadSpriteModel( m_pSprite );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1865,7 +1866,8 @@ int pfnDrawConsoleString( int x, int y, char *string )
|
||||||
{
|
{
|
||||||
int drawLen;
|
int drawLen;
|
||||||
|
|
||||||
if( !string || !*string ) return 0; // silent ignore
|
if( !COM_CheckString( string ))
|
||||||
|
return 0; // silent ignore
|
||||||
Con_SetFont( con_fontsize->value );
|
Con_SetFont( con_fontsize->value );
|
||||||
|
|
||||||
clgame.ds.adjust_size = true;
|
clgame.ds.adjust_size = true;
|
||||||
|
|
|
@ -208,7 +208,7 @@ An svc_signonnum has been received, perform a client side setup
|
||||||
void CL_SignonReply( void )
|
void CL_SignonReply( void )
|
||||||
{
|
{
|
||||||
// g-cont. my favorite message :-)
|
// g-cont. my favorite message :-)
|
||||||
Con_DPrintf( "CL_SignonReply: %i\n", cls.signon );
|
Con_Reportf( "CL_SignonReply: %i\n", cls.signon );
|
||||||
|
|
||||||
switch( cls.signon )
|
switch( cls.signon )
|
||||||
{
|
{
|
||||||
|
@ -1745,7 +1745,7 @@ void CL_ConnectionlessPacket( netadr_t from, sizebuf_t *msg )
|
||||||
Cmd_TokenizeString( args );
|
Cmd_TokenizeString( args );
|
||||||
c = Cmd_Argv( 0 );
|
c = Cmd_Argv( 0 );
|
||||||
|
|
||||||
MsgDev( D_NOTE, "CL_ConnectionlessPacket: %s : %s\n", NET_AdrToString( from ), c );
|
Con_Reportf( "CL_ConnectionlessPacket: %s : %s\n", NET_AdrToString( from ), c );
|
||||||
|
|
||||||
// server connection
|
// server connection
|
||||||
if( !Q_strcmp( c, "client_connect" ))
|
if( !Q_strcmp( c, "client_connect" ))
|
||||||
|
@ -2387,7 +2387,7 @@ qboolean CL_PrecacheResources( void )
|
||||||
|
|
||||||
if( cl.models[pRes->nIndex] == NULL )
|
if( cl.models[pRes->nIndex] == NULL )
|
||||||
{
|
{
|
||||||
MsgDev( D_ERROR, "submodel %s not found\n", pRes->szFileName );
|
Con_Printf( S_ERROR "submodel %s not found\n", pRes->szFileName );
|
||||||
|
|
||||||
if( FBitSet( pRes->ucFlags, RES_FATALIFMISSING ))
|
if( FBitSet( pRes->ucFlags, RES_FATALIFMISSING ))
|
||||||
{
|
{
|
||||||
|
@ -2414,6 +2414,7 @@ qboolean CL_PrecacheResources( void )
|
||||||
{
|
{
|
||||||
if( FBitSet( pRes->ucFlags, RES_WASMISSING ))
|
if( FBitSet( pRes->ucFlags, RES_WASMISSING ))
|
||||||
{
|
{
|
||||||
|
Con_Printf( S_ERROR "%s%s couldn't load\n", DEFAULT_SOUNDPATH, pRes->szFileName );
|
||||||
cl.sound_precache[pRes->nIndex][0] = 0;
|
cl.sound_precache[pRes->nIndex][0] = 0;
|
||||||
cl.sound_index[pRes->nIndex] = 0;
|
cl.sound_index[pRes->nIndex] = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -481,9 +481,6 @@ void CL_AddLinksToPmove( frame_t *frame )
|
||||||
if( VectorIsNull( state->mins ) && VectorIsNull( state->maxs ))
|
if( VectorIsNull( state->mins ) && VectorIsNull( state->maxs ))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ( !model->hulls[1].lastclipnode && model->type != mod_studio )
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if( state->solid == SOLID_NOT && state->skin < CONTENTS_EMPTY )
|
if( state->solid == SOLID_NOT && state->skin < CONTENTS_EMPTY )
|
||||||
{
|
{
|
||||||
if( clgame.pmove->nummoveent >= MAX_MOVEENTS )
|
if( clgame.pmove->nummoveent >= MAX_MOVEENTS )
|
||||||
|
@ -495,6 +492,9 @@ void CL_AddLinksToPmove( frame_t *frame )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if( !model->hulls[1].lastclipnode && model->type != mod_studio )
|
||||||
|
continue;
|
||||||
|
|
||||||
// reserve slots for all the clients
|
// reserve slots for all the clients
|
||||||
if( clgame.pmove->numphysent >= ( MAX_PHYSENTS - cl.maxclients ))
|
if( clgame.pmove->numphysent >= ( MAX_PHYSENTS - cl.maxclients ))
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -586,8 +586,8 @@ void SCR_InstallParticlePalette( void )
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
// first check 'palette.lmp' then 'palette.pal'
|
// first check 'palette.lmp' then 'palette.pal'
|
||||||
pic = FS_LoadImage( "gfx/palette.lmp", NULL, 0 );
|
pic = FS_LoadImage( DEFAULT_INTERNAL_PALETTE, NULL, 0 );
|
||||||
if( !pic ) pic = FS_LoadImage( "gfx/palette.pal", NULL, 0 );
|
if( !pic ) pic = FS_LoadImage( DEFAULT_EXTERNAL_PALETTE, NULL, 0 );
|
||||||
|
|
||||||
// NOTE: imagelib required this fakebuffer for loading internal palette
|
// NOTE: imagelib required this fakebuffer for loading internal palette
|
||||||
if( !pic ) pic = FS_LoadImage( "#valve.pal", (byte *)&i, 768 );
|
if( !pic ) pic = FS_LoadImage( "#valve.pal", (byte *)&i, 768 );
|
||||||
|
@ -604,13 +604,13 @@ void SCR_InstallParticlePalette( void )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// someone deleted internal palette from code...
|
||||||
for( i = 0; i < 256; i++ )
|
for( i = 0; i < 256; i++ )
|
||||||
{
|
{
|
||||||
clgame.palette[i].r = i;
|
clgame.palette[i].r = i;
|
||||||
clgame.palette[i].g = i;
|
clgame.palette[i].g = i;
|
||||||
clgame.palette[i].b = i;
|
clgame.palette[i].b = i;
|
||||||
}
|
}
|
||||||
MsgDev( D_WARN, "CL_InstallParticlePalette: failed. Force to grayscale\n" );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -731,12 +731,12 @@ void SCR_Init( void )
|
||||||
host.allow_console = true; // we need console, because menu is missing
|
host.allow_console = true; // we need console, because menu is missing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SCR_VidInit();
|
||||||
SCR_LoadCreditsFont ();
|
SCR_LoadCreditsFont ();
|
||||||
SCR_InstallParticlePalette ();
|
|
||||||
SCR_RegisterTextures ();
|
SCR_RegisterTextures ();
|
||||||
|
SCR_InstallParticlePalette ();
|
||||||
SCR_InitCinematic();
|
SCR_InitCinematic();
|
||||||
CL_InitNetgraph();
|
CL_InitNetgraph();
|
||||||
SCR_VidInit();
|
|
||||||
|
|
||||||
if( host.allow_console && Sys_CheckParm( "-toconsole" ))
|
if( host.allow_console && Sys_CheckParm( "-toconsole" ))
|
||||||
Cbuf_AddText( "toggleconsole\n" );
|
Cbuf_AddText( "toggleconsole\n" );
|
||||||
|
|
|
@ -1897,14 +1897,14 @@ void CL_ParseViewBeam( sizebuf_t *msg, int beamType )
|
||||||
startFrame = MSG_ReadByte( msg );
|
startFrame = MSG_ReadByte( msg );
|
||||||
frameRate = (float)(MSG_ReadByte( msg ));
|
frameRate = (float)(MSG_ReadByte( msg ));
|
||||||
life = (float)(MSG_ReadByte( msg ) * 0.1f);
|
life = (float)(MSG_ReadByte( msg ) * 0.1f);
|
||||||
width = (float)(MSG_ReadByte( msg ) * 0.1f);
|
width = (float)(MSG_ReadByte( msg ));
|
||||||
noise = (float)(MSG_ReadByte( msg ) * 0.01f);
|
noise = (float)(MSG_ReadByte( msg ) * 0.1f);
|
||||||
r = (float)MSG_ReadByte( msg ) / 255.0f;
|
r = (float)MSG_ReadByte( msg ) / 255.0f;
|
||||||
g = (float)MSG_ReadByte( msg ) / 255.0f;
|
g = (float)MSG_ReadByte( msg ) / 255.0f;
|
||||||
b = (float)MSG_ReadByte( msg ) / 255.0f;
|
b = (float)MSG_ReadByte( msg ) / 255.0f;
|
||||||
a = (float)MSG_ReadByte( msg ) / 255.0f;
|
a = (float)MSG_ReadByte( msg ) / 255.0f;
|
||||||
speed = (float)MSG_ReadByte( msg );
|
speed = (float)(MSG_ReadByte( msg ) / 0.1f);
|
||||||
R_BeamCirclePoints( beamType, start, end, modelIndex, life, width, noise, a, speed / 10.0f, startFrame, frameRate, r, g, b );
|
R_BeamCirclePoints( beamType, start, end, modelIndex, life, width, noise, a, speed, startFrame, frameRate, r, g, b );
|
||||||
break;
|
break;
|
||||||
case TE_BEAMFOLLOW:
|
case TE_BEAMFOLLOW:
|
||||||
startEnt = MSG_ReadShort( msg );
|
startEnt = MSG_ReadShort( msg );
|
||||||
|
|
|
@ -355,9 +355,9 @@ static qboolean R_RecursiveLightPoint( model_t *model, mnode_t *node, float p1f,
|
||||||
if( dm != NULL )
|
if( dm != NULL )
|
||||||
{
|
{
|
||||||
vec3_t srcNormal, lightNormal;
|
vec3_t srcNormal, lightNormal;
|
||||||
float f = (1.0f / 255.0f);
|
float f = (1.0f / 128.0f);
|
||||||
|
|
||||||
VectorSet( srcNormal, (dm->r * f) * 2.0f - 1.0f, (dm->g * f) * 2.0f - 1.0f, (dm->b * f) * 2.0f - 1.0f );
|
VectorSet( srcNormal, ((float)dm->r - 128.0f) * f, ((float)dm->g - 128.0f) * f, ((float)dm->b - 128.0f) * f );
|
||||||
Matrix3x4_VectorIRotate( tbn, srcNormal, lightNormal ); // turn to world space
|
Matrix3x4_VectorIRotate( tbn, srcNormal, lightNormal ); // turn to world space
|
||||||
VectorScale( lightNormal, (float)scale * -1.0f, lightNormal ); // turn direction from light
|
VectorScale( lightNormal, (float)scale * -1.0f, lightNormal ); // turn direction from light
|
||||||
VectorAdd( g_trace_lightvec, lightNormal, g_trace_lightvec );
|
VectorAdd( g_trace_lightvec, lightNormal, g_trace_lightvec );
|
||||||
|
|
|
@ -1657,7 +1657,7 @@ void GL_InitExtensions( void )
|
||||||
glConfig.renderer_string = pglGetString( GL_RENDERER );
|
glConfig.renderer_string = pglGetString( GL_RENDERER );
|
||||||
glConfig.version_string = pglGetString( GL_VERSION );
|
glConfig.version_string = pglGetString( GL_VERSION );
|
||||||
glConfig.extensions_string = pglGetString( GL_EXTENSIONS );
|
glConfig.extensions_string = pglGetString( GL_EXTENSIONS );
|
||||||
Con_Printf( "Video: %s\n", glConfig.renderer_string );
|
Con_Printf( "^3Video:^7 %s\n", glConfig.renderer_string );
|
||||||
|
|
||||||
// intialize wrapper type
|
// intialize wrapper type
|
||||||
glConfig.context = CONTEXT_TYPE_GL;
|
glConfig.context = CONTEXT_TYPE_GL;
|
||||||
|
|
|
@ -311,9 +311,6 @@ int SNDDMA_Init( void *hInst )
|
||||||
// init DirectSound
|
// init DirectSound
|
||||||
if( SNDDMA_InitDirect( hInst ) != SIS_SUCCESS )
|
if( SNDDMA_InitDirect( hInst ) != SIS_SUCCESS )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if( snd_firsttime )
|
|
||||||
Con_Printf( "Audio: DirectSound\n" );
|
|
||||||
dma.initialized = true;
|
dma.initialized = true;
|
||||||
snd_firsttime = false;
|
snd_firsttime = false;
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,6 @@ int Q_buildnum( void )
|
||||||
|
|
||||||
return b;
|
return b;
|
||||||
#else
|
#else
|
||||||
return 4140;
|
return 4143;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,10 @@ GNU General Public License for more details.
|
||||||
// debug beams
|
// debug beams
|
||||||
#define DEFAULT_LASERBEAM_PATH "sprites/laserbeam.spr"
|
#define DEFAULT_LASERBEAM_PATH "sprites/laserbeam.spr"
|
||||||
|
|
||||||
|
#define DEFAULT_INTERNAL_PALETTE "gfx/palette.lmp"
|
||||||
|
|
||||||
|
#define DEFAULT_EXTERNAL_PALETTE "gfx/palette.pal"
|
||||||
|
|
||||||
// path to folders where placed all sounds
|
// path to folders where placed all sounds
|
||||||
#define DEFAULT_SOUNDPATH "sound/"
|
#define DEFAULT_SOUNDPATH "sound/"
|
||||||
|
|
||||||
|
|
|
@ -346,6 +346,10 @@ void Host_InitDecals( void )
|
||||||
int i, num_decals = 0;
|
int i, num_decals = 0;
|
||||||
search_t *t;
|
search_t *t;
|
||||||
|
|
||||||
|
// NOTE: only once resource without which engine can't continue work
|
||||||
|
if( !FS_FileExists( "gfx/conchars", false ))
|
||||||
|
Sys_Error( "W_LoadWadFile: couldn't load gfx.wad\n" );
|
||||||
|
|
||||||
memset( host.draw_decals, 0, sizeof( host.draw_decals ));
|
memset( host.draw_decals, 0, sizeof( host.draw_decals ));
|
||||||
|
|
||||||
// lookup all the decals in decals.wad (basedir, gamedir, falldir)
|
// lookup all the decals in decals.wad (basedir, gamedir, falldir)
|
||||||
|
|
|
@ -149,7 +149,7 @@ void COM_Frame( float time )
|
||||||
{
|
{
|
||||||
int oldState = GameState->curstate;
|
int oldState = GameState->curstate;
|
||||||
|
|
||||||
// execute the current state (and transition to the next state if not in HS_RUN)
|
// execute the current state (and transition to the next state if not in STATE_RUNFRAME)
|
||||||
switch( GameState->curstate )
|
switch( GameState->curstate )
|
||||||
{
|
{
|
||||||
case STATE_LOAD_LEVEL:
|
case STATE_LOAD_LEVEL:
|
||||||
|
|
|
@ -28,6 +28,7 @@ GNU General Public License for more details.
|
||||||
typedef struct wadlist_s
|
typedef struct wadlist_s
|
||||||
{
|
{
|
||||||
char wadnames[MAX_MAP_WADS][32];
|
char wadnames[MAX_MAP_WADS][32];
|
||||||
|
int wadusage[MAX_MAP_WADS];
|
||||||
int count;
|
int count;
|
||||||
} wadlist_t;
|
} wadlist_t;
|
||||||
|
|
||||||
|
@ -334,10 +335,9 @@ static void Mod_LoadLump( const byte *in, mlumpinfo_t *info, mlumpstat_t *stat,
|
||||||
loadstat.numerrors++;
|
loadstat.numerrors++;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else if( !FBitSet( flags, LUMP_SILENT ))
|
||||||
{
|
{
|
||||||
// just throw warning
|
// just throw warning
|
||||||
if( !FBitSet( flags, LUMP_SILENT ))
|
|
||||||
MsgDev( D_WARN, "map ^2%s^7 has too many %s\n", loadstat.name, msg1 );
|
MsgDev( D_WARN, "map ^2%s^7 has too many %s\n", loadstat.name, msg1 );
|
||||||
loadstat.numwarnings++;
|
loadstat.numwarnings++;
|
||||||
}
|
}
|
||||||
|
@ -1595,6 +1595,7 @@ static void Mod_LoadEntities( dbspmodel_t *bmod )
|
||||||
{
|
{
|
||||||
int num = bmod->wadlist.count++;
|
int num = bmod->wadlist.count++;
|
||||||
Q_strncpy( bmod->wadlist.wadnames[num], token, sizeof( bmod->wadlist.wadnames[0] ));
|
Q_strncpy( bmod->wadlist.wadnames[num], token, sizeof( bmod->wadlist.wadnames[0] ));
|
||||||
|
bmod->wadlist.wadusage[num] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( bmod->wadlist.count >= MAX_MAP_WADS )
|
if( bmod->wadlist.count >= MAX_MAP_WADS )
|
||||||
|
@ -1886,6 +1887,7 @@ static void Mod_LoadTextures( dbspmodel_t *bmod )
|
||||||
if( FS_FileExists( texpath, false ))
|
if( FS_FileExists( texpath, false ))
|
||||||
{
|
{
|
||||||
tx->gl_texturenum = GL_LoadTexture( texpath, NULL, 0, 0, filter );
|
tx->gl_texturenum = GL_LoadTexture( texpath, NULL, 0, 0, filter );
|
||||||
|
bmod->wadlist.wadusage[j]++; // this wad are really used
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1942,6 +1944,7 @@ static void Mod_LoadTextures( dbspmodel_t *bmod )
|
||||||
if( FS_FileExists( texpath, false ))
|
if( FS_FileExists( texpath, false ))
|
||||||
{
|
{
|
||||||
src = FS_LoadFile( texpath, &srcSize, false );
|
src = FS_LoadFile( texpath, &srcSize, false );
|
||||||
|
bmod->wadlist.wadusage[j]++; // this wad are really used
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2694,11 +2697,15 @@ qboolean Mod_LoadBmodelLumps( const byte *mod_base, qboolean isworld )
|
||||||
}
|
}
|
||||||
|
|
||||||
for( i = 0; i < bmod->wadlist.count; i++ )
|
for( i = 0; i < bmod->wadlist.count; i++ )
|
||||||
|
{
|
||||||
|
if( !bmod->wadlist.wadusage[i] )
|
||||||
|
continue;
|
||||||
Q_strncat( wadvalue, va( "%s.wad; ", bmod->wadlist.wadnames[i] ), sizeof( wadvalue ));
|
Q_strncat( wadvalue, va( "%s.wad; ", bmod->wadlist.wadnames[i] ), sizeof( wadvalue ));
|
||||||
|
}
|
||||||
|
|
||||||
if( COM_CheckString( wadvalue ))
|
if( COM_CheckString( wadvalue ))
|
||||||
{
|
{
|
||||||
wadvalue[Q_strlen( wadvalue ) - 2] = '\0';
|
wadvalue[Q_strlen( wadvalue ) - 2] = '\0'; // kill the last semicolon
|
||||||
Con_DPrintf( "Wad files required to run the map: \"%s\"\n", wadvalue );
|
Con_DPrintf( "Wad files required to run the map: \"%s\"\n", wadvalue );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2974,17 +2981,30 @@ only empty lumps is allows
|
||||||
*/
|
*/
|
||||||
int Mod_SaveLump( const char *filename, const int lump, void *lumpdata, int lumpsize )
|
int Mod_SaveLump( const char *filename, const int lump, void *lumpdata, int lumpsize )
|
||||||
{
|
{
|
||||||
file_t *f = FS_Open( filename, "e+b", true );
|
|
||||||
byte buffer[sizeof( dheader_t ) + sizeof( dextrahdr_t )];
|
byte buffer[sizeof( dheader_t ) + sizeof( dextrahdr_t )];
|
||||||
size_t prefetch_size = sizeof( buffer );
|
size_t prefetch_size = sizeof( buffer );
|
||||||
|
int result, dummy = lumpsize;
|
||||||
dextrahdr_t *extrahdr;
|
dextrahdr_t *extrahdr;
|
||||||
dheader_t *header;
|
dheader_t *header;
|
||||||
|
file_t *f;
|
||||||
if( !f ) return LUMP_SAVE_COULDNT_OPEN;
|
|
||||||
|
|
||||||
if( !lumpdata || lumpsize <= 0 )
|
if( !lumpdata || lumpsize <= 0 )
|
||||||
return LUMP_SAVE_NO_DATA;
|
return LUMP_SAVE_NO_DATA;
|
||||||
|
|
||||||
|
// make sure what .bsp is placed into gamedir and not in pak
|
||||||
|
if( !FS_GetDiskPath( filename, true ))
|
||||||
|
return LUMP_SAVE_COULDNT_OPEN;
|
||||||
|
|
||||||
|
// first we should sure what we allow to rewrite this .bsp
|
||||||
|
result = Mod_CheckLump( filename, lump, &dummy );
|
||||||
|
|
||||||
|
if( result != LUMP_LOAD_NOT_EXIST )
|
||||||
|
return result;
|
||||||
|
|
||||||
|
f = FS_Open( filename, "e+b", true );
|
||||||
|
|
||||||
|
if( !f ) return LUMP_SAVE_COULDNT_OPEN;
|
||||||
|
|
||||||
if( FS_Read( f, buffer, prefetch_size ) != prefetch_size )
|
if( FS_Read( f, buffer, prefetch_size ) != prefetch_size )
|
||||||
{
|
{
|
||||||
FS_Close( f );
|
FS_Close( f );
|
||||||
|
@ -2993,6 +3013,7 @@ int Mod_SaveLump( const char *filename, const int lump, void *lumpdata, int lump
|
||||||
|
|
||||||
header = (dheader_t *)buffer;
|
header = (dheader_t *)buffer;
|
||||||
|
|
||||||
|
// these checks below are redundant
|
||||||
if( header->version != HLBSP_VERSION )
|
if( header->version != HLBSP_VERSION )
|
||||||
{
|
{
|
||||||
FS_Close( f );
|
FS_Close( f );
|
||||||
|
|
|
@ -711,6 +711,7 @@ void Mod_ReleaseHullPolygons( void )
|
||||||
hull_model_t *model = &world.hull_models[i];
|
hull_model_t *model = &world.hull_models[i];
|
||||||
free_hull_polys( &model->polys );
|
free_hull_polys( &model->polys );
|
||||||
}
|
}
|
||||||
|
world.num_hull_models = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void R_DrawWorldHull( void )
|
void R_DrawWorldHull( void )
|
||||||
|
|
|
@ -299,7 +299,7 @@ loc0:
|
||||||
{
|
{
|
||||||
trace->fraction = midf;
|
trace->fraction = midf;
|
||||||
VectorCopy( mid, trace->endpos );
|
VectorCopy( mid, trace->endpos );
|
||||||
MsgDev( D_WARN, "trace backed up past 0.0\n" );
|
Con_Reportf( S_WARN "trace backed up past 0.0\n" );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -329,7 +329,7 @@ void SV_ConnectClient( netadr_t from )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MsgDev( D_INFO, "%s:reconnect\n", NET_AdrToString( from ));
|
Con_Reportf( S_NOTE "%s:reconnect\n", NET_AdrToString( from ));
|
||||||
}
|
}
|
||||||
|
|
||||||
// find a client slot
|
// find a client slot
|
||||||
|
@ -2077,7 +2077,7 @@ void SV_ConnectionlessPacket( netadr_t from, sizebuf_t *msg )
|
||||||
Cmd_TokenizeString( args );
|
Cmd_TokenizeString( args );
|
||||||
|
|
||||||
pcmd = Cmd_Argv( 0 );
|
pcmd = Cmd_Argv( 0 );
|
||||||
Con_DPrintf( "SV_ConnectionlessPacket: %s : %s\n", NET_AdrToString( from ), pcmd );
|
Con_Reportf( "SV_ConnectionlessPacket: %s : %s\n", NET_AdrToString( from ), pcmd );
|
||||||
|
|
||||||
if( !Q_strcmp( pcmd, "ping" )) SV_Ping( from );
|
if( !Q_strcmp( pcmd, "ping" )) SV_Ping( from );
|
||||||
else if( !Q_strcmp( pcmd, "ack" )) SV_Ack( from );
|
else if( !Q_strcmp( pcmd, "ack" )) SV_Ack( from );
|
||||||
|
|
|
@ -315,7 +315,7 @@ SV_Load_f
|
||||||
*/
|
*/
|
||||||
void SV_Load_f( void )
|
void SV_Load_f( void )
|
||||||
{
|
{
|
||||||
string path;
|
char path[MAX_QPATH];
|
||||||
|
|
||||||
if( Cmd_Argc() != 2 )
|
if( Cmd_Argc() != 2 )
|
||||||
{
|
{
|
||||||
|
|
|
@ -1318,6 +1318,7 @@ void pfnChangeLevel( const char *level, const char *landmark )
|
||||||
COM_StripExtension( mapname );
|
COM_StripExtension( mapname );
|
||||||
landname[0] ='\0';
|
landname[0] ='\0';
|
||||||
|
|
||||||
|
#ifdef HACKS_RELATED_HLMODS
|
||||||
// g-cont. some level-designers wrote landmark name with space
|
// g-cont. some level-designers wrote landmark name with space
|
||||||
// and Cmd_TokenizeString separating all the after space as next argument
|
// and Cmd_TokenizeString separating all the after space as next argument
|
||||||
// emulate this bug for compatibility
|
// emulate this bug for compatibility
|
||||||
|
@ -1326,9 +1327,13 @@ void pfnChangeLevel( const char *level, const char *landmark )
|
||||||
text = (char *)landname;
|
text = (char *)landname;
|
||||||
while( *landmark && ((byte)*landmark) != ' ' )
|
while( *landmark && ((byte)*landmark) != ' ' )
|
||||||
*text++ = *landmark++;
|
*text++ = *landmark++;
|
||||||
smooth = true;
|
|
||||||
*text = '\0';
|
*text = '\0';
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
Q_strncpy( landname, landmark, sizeof( landname ));
|
||||||
|
#endif
|
||||||
|
if( COM_CheckString( landname ))
|
||||||
|
smooth = true;
|
||||||
|
|
||||||
// determine spawn entity classname
|
// determine spawn entity classname
|
||||||
if( svs.maxclients == 1 )
|
if( svs.maxclients == 1 )
|
||||||
|
@ -2399,7 +2404,7 @@ void pfnServerExecute( void )
|
||||||
Cbuf_Execute();
|
Cbuf_Execute();
|
||||||
|
|
||||||
if( host.sv_cvars_restored > 0 )
|
if( host.sv_cvars_restored > 0 )
|
||||||
Con_DPrintf( "server executing ^2config.cfg^7 (%i cvars)\n", host.sv_cvars_restored );
|
Con_Reportf( "server executing ^2config.cfg^7 (%i cvars)\n", host.sv_cvars_restored );
|
||||||
|
|
||||||
host.apply_game_config = false;
|
host.apply_game_config = false;
|
||||||
svgame.config_executed = true;
|
svgame.config_executed = true;
|
||||||
|
@ -3406,7 +3411,7 @@ OBSOLETE, UNUSED
|
||||||
*/
|
*/
|
||||||
uint pfnGetPlayerWONId( edict_t *e )
|
uint pfnGetPlayerWONId( edict_t *e )
|
||||||
{
|
{
|
||||||
return -1;
|
return (uint)-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -4841,7 +4846,7 @@ qboolean SV_LoadProgs( const char *name )
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else Con_DPrintf( "SV_LoadProgs: ^2initailized extended EntityAPI ^7ver. %i\n", version );
|
else Con_Reportf( "SV_LoadProgs: ^2initailized extended EntityAPI ^7ver. %i\n", version );
|
||||||
}
|
}
|
||||||
else if( !GetEntityAPI( &svgame.dllFuncs, version ))
|
else if( !GetEntityAPI( &svgame.dllFuncs, version ))
|
||||||
{
|
{
|
||||||
|
|
|
@ -725,7 +725,7 @@ void SV_SetupClients( void )
|
||||||
svs.clients = Z_Realloc( svs.clients, sizeof( sv_client_t ) * svs.maxclients );
|
svs.clients = Z_Realloc( svs.clients, sizeof( sv_client_t ) * svs.maxclients );
|
||||||
svs.num_client_entities = svs.maxclients * SV_UPDATE_BACKUP * NUM_PACKET_ENTITIES;
|
svs.num_client_entities = svs.maxclients * SV_UPDATE_BACKUP * NUM_PACKET_ENTITIES;
|
||||||
svs.packet_entities = Z_Realloc( svs.packet_entities, sizeof( entity_state_t ) * svs.num_client_entities );
|
svs.packet_entities = Z_Realloc( svs.packet_entities, sizeof( entity_state_t ) * svs.num_client_entities );
|
||||||
Con_DPrintf( "%s alloced by server packet entities\n", Q_memprint( sizeof( entity_state_t ) * svs.num_client_entities ));
|
Con_Reportf( "%s alloced by server packet entities\n", Q_memprint( sizeof( entity_state_t ) * svs.num_client_entities ));
|
||||||
|
|
||||||
// init network stuff
|
// init network stuff
|
||||||
NET_Config(( svs.maxclients > 1 ));
|
NET_Config(( svs.maxclients > 1 ));
|
||||||
|
|
Loading…
Add table
Reference in a new issue