Browse Source

Made various log messages more informative

pull/2/head
Jonathan Poncelet 6 years ago
parent
commit
35869586c9
  1. 4
      engine/client/cl_game.c
  2. 2
      engine/client/cl_gameui.c
  3. 4
      engine/client/cl_main.c
  4. 4
      engine/client/s_vox.c
  5. 2
      engine/common/mod_bmodel.c
  6. 8
      engine/common/model.c
  7. 10
      engine/server/sv_game.c
  8. 2
      engine/server/sv_save.c

4
engine/client/cl_game.c

@ -1215,7 +1215,7 @@ static qboolean CL_LoadHudSprite( const char *szSpriteName, model_t *m_pSprite, @@ -1215,7 +1215,7 @@ static qboolean CL_LoadHudSprite( const char *szSpriteName, model_t *m_pSprite,
}
else
{
Con_Reportf( S_ERROR "%s couldn't load\n", szSpriteName );
Con_Reportf( S_ERROR "Could not load HUD sprite %s\n", szSpriteName );
Mod_UnloadSpriteModel( m_pSprite );
return false;
}
@ -2341,7 +2341,7 @@ int CL_FindModelIndex( const char *m ) @@ -2341,7 +2341,7 @@ int CL_FindModelIndex( const char *m )
if( lasttimewarn < host.realtime )
{
// tell user about problem (but don't spam console)
Con_Printf( S_ERROR "%s not precached\n", filepath );
Con_Printf( S_ERROR "Could not find index for model %s: not precached\n", filepath );
lasttimewarn = host.realtime + 1.0f;
}

2
engine/client/cl_gameui.c

@ -382,7 +382,7 @@ static HIMAGE pfnPIC_Load( const char *szPicName, const byte *image_buf, int ima @@ -382,7 +382,7 @@ static HIMAGE pfnPIC_Load( const char *szPicName, const byte *image_buf, int ima
if( !szPicName || !*szPicName )
{
Con_Reportf( S_ERROR "CL_LoadImage: bad name!\n" );
Con_Reportf( S_ERROR "CL_LoadImage: refusing to load image with empty name\n" );
return 0;
}

4
engine/client/cl_main.c

@ -2278,7 +2278,7 @@ void CL_ProcessFile( qboolean successfully_received, const char *filename ) @@ -2278,7 +2278,7 @@ void CL_ProcessFile( qboolean successfully_received, const char *filename )
}
else
{
Con_Printf( "Downloaded %i bytes for purported %i byte file, ignoring download\n",
Con_Printf( "Downloaded %i bytes for purported %i byte file, ignoring download\n",
cls.netchan.tempbuffersize, p->nDownloadSize );
}
@ -2473,7 +2473,7 @@ qboolean CL_PrecacheResources( void ) @@ -2473,7 +2473,7 @@ qboolean CL_PrecacheResources( void )
{
if( FBitSet( pRes->ucFlags, RES_WASMISSING ))
{
Con_Printf( S_ERROR "%s%s couldn't load\n", DEFAULT_SOUNDPATH, pRes->szFileName );
Con_Printf( S_ERROR "Could not load sound %s%s for precache\n", DEFAULT_SOUNDPATH, pRes->szFileName );
cl.sound_precache[pRes->nIndex][0] = 0;
cl.sound_index[pRes->nIndex] = 0;
}

4
engine/client/s_vox.c

@ -545,7 +545,7 @@ void VOX_ParseLineCommands( char *pSentenceData, int sentenceIndex ) @@ -545,7 +545,7 @@ void VOX_ParseLineCommands( char *pSentenceData, int sentenceIndex )
length = pNext - pSentenceData;
if( tempBufferPos + length > sizeof( tempBuffer ))
{
Con_Printf( S_ERROR "sentence too long!\n" );
Con_Printf( S_ERROR "Sentence exceeded max length of %d\n", sizeof(tempBuffer) - 1 );
return;
}
@ -619,7 +619,7 @@ void VOX_ReadSentenceFile( const char *psentenceFileName ) @@ -619,7 +619,7 @@ void VOX_ReadSentenceFile( const char *psentenceFileName )
{
if( g_numSentences >= MAX_SENTENCES )
{
Con_Printf( S_ERROR "VOX_Init: too many sentences specified\n" );
Con_Printf( S_ERROR "VOX_Init: too many sentences specified, max is %d\n", MAX_SENTENCES );
break;
}

2
engine/common/mod_bmodel.c

@ -309,7 +309,7 @@ static void Mod_LoadLump( const byte *in, mlumpinfo_t *info, mlumpstat_t *stat, @@ -309,7 +309,7 @@ static void Mod_LoadLump( const byte *in, mlumpinfo_t *info, mlumpstat_t *stat,
if( l->filelen % real_entrysize )
{
if( !FBitSet( flags, LUMP_SILENT ))
Con_DPrintf( S_ERROR "Mod_Load%s: funny lump size\n", msg2 );
Con_DPrintf( S_ERROR "Mod_Load%s: Lump size %d was not a multiple of %u bytes\n", msg2, l->filelen, real_entrysize );
loadstat.numerrors++;
return;
}

8
engine/common/model.c

@ -288,8 +288,8 @@ model_t *Mod_LoadModel( model_t *mod, qboolean crash ) @@ -288,8 +288,8 @@ model_t *Mod_LoadModel( model_t *mod, qboolean crash )
{
memset( mod, 0, sizeof( model_t ));
if( crash ) Host_Error( "%s couldn't load\n", tempname );
else Con_Printf( S_ERROR "%s couldn't load\n", tempname );
if( crash ) Host_Error( "Could not load model %s from disk\n", tempname );
else Con_Printf( S_ERROR "Could not load model %s from disk\n", tempname );
return NULL;
}
@ -331,8 +331,8 @@ model_t *Mod_LoadModel( model_t *mod, qboolean crash ) @@ -331,8 +331,8 @@ model_t *Mod_LoadModel( model_t *mod, qboolean crash )
Mod_FreeModel( mod );
Mem_Free( buf );
if( crash ) Host_Error( "%s couldn't load\n", tempname );
else Con_Printf( S_ERROR "%s couldn't load\n", tempname );
if( crash ) Host_Error( "Could not load model %s\n", tempname );
else Con_Printf( S_ERROR "Could not load model %s\n", tempname );
return NULL;
}

10
engine/server/sv_game.c

@ -1303,7 +1303,7 @@ void pfnSetModel( edict_t *e, const char *m ) @@ -1303,7 +1303,7 @@ void pfnSetModel( edict_t *e, const char *m )
if( i == MAX_MODELS )
{
Con_Printf( S_ERROR "no precache: %s\n", name );
Con_Printf( S_ERROR "Failed to set model %s: was not precached\n", name );
return;
}
}
@ -1311,7 +1311,7 @@ void pfnSetModel( edict_t *e, const char *m ) @@ -1311,7 +1311,7 @@ void pfnSetModel( edict_t *e, const char *m )
if( e == svgame.edicts )
{
if( sv.state == ss_active )
Con_Printf( S_ERROR "world model can't be changed\n" );
Con_Printf( S_ERROR "Failed to set model %s: world model cannot be changed\n", name );
return;
}
@ -1358,8 +1358,8 @@ int pfnModelIndex( const char *m ) @@ -1358,8 +1358,8 @@ int pfnModelIndex( const char *m )
return i;
}
Con_Printf( S_ERROR "no precache: %s\n", name );
return 0;
Con_Printf( S_ERROR "Cannot get index for model %s: not precached\n", name );
return 0;
}
/*
@ -4410,7 +4410,7 @@ void pfnForceUnmodified( FORCE_TYPE type, float *mins, float *maxs, const char * @@ -4410,7 +4410,7 @@ void pfnForceUnmodified( FORCE_TYPE type, float *mins, float *maxs, const char *
if( !Q_strcmp( filename, pc->filename ))
return;
}
Con_Printf( S_ERROR "no precache: %s\n", filename );
Con_Printf( S_ERROR "Failed to enforce consistency for %s: was not precached\n", filename );
}
}

2
engine/server/sv_save.c

@ -842,7 +842,7 @@ static SAVERESTOREDATA *LoadSaveData( const char *level ) @@ -842,7 +842,7 @@ static SAVERESTOREDATA *LoadSaveData( const char *level )
if(( pFile = FS_Open( name, "rb", true )) == NULL )
{
Con_Printf( S_ERROR "couldn't open.\n" );
Con_Printf( S_ERROR "Couldn't open save data file %s.\n", name );
return NULL;
}

Loading…
Cancel
Save