diff --git a/engine/common/common.c b/engine/common/common.c index c7c295c9..3e1fcaae 100644 --- a/engine/common/common.c +++ b/engine/common/common.c @@ -1053,6 +1053,21 @@ qboolean COM_IsSafeFileToDownload( const char *filename ) return true; } +const char *COM_GetResourceTypeName( resourcetype_t restype ) +{ + switch( restype ) + { + case t_decal: return "decal"; + case t_eventscript: return "eventscript"; + case t_generic: return "generic"; + case t_model: return "model"; + case t_skin: return "skin"; + case t_sound: return "sound"; + case t_world: return "world"; + default: return "unknown"; + } +} + char *_copystring( poolhandle_t mempool, const char *s, const char *filename, int fileline ) { char *b; diff --git a/engine/common/common.h b/engine/common/common.h index 7835891d..10e1b06c 100644 --- a/engine/common/common.h +++ b/engine/common/common.h @@ -638,6 +638,7 @@ void COM_HexConvert( const char *pszInput, int nInputLength, byte *pOutput ); int COM_SaveFile( const char *filename, const void *data, int len ); byte* COM_LoadFileForMe( const char *filename, int *pLength ); qboolean COM_IsSafeFileToDownload( const char *filename ); +const char *COM_GetResourceTypeName( resourcetype_t restype ); cvar_t *pfnCVarGetPointer( const char *szVarName ); int pfnDrawConsoleString( int x, int y, char *string ); void pfnDrawSetTextColor( float r, float g, float b );