From: MegaBrutal Date: Tue, 21 Feb 2023 22:30:00 +0000 (+0100) Subject: Make precache logging more concise X-Git-Url: http://git.megabrutal.com/?a=commitdiff_plain;h=8afb616994d88d658168baed26693e174886ecbe;p=pmprecache.git Make precache logging more concise --- diff --git a/dllapi.cpp b/dllapi.cpp index 0c8f15e..acc2906 100644 --- a/dllapi.cpp +++ b/dllapi.cpp @@ -117,17 +117,16 @@ void ClientPutInServer( edict_t *pEntity ) { } void ServerActivate(edict_t *pEdictList, int edictCount, int clientMax) { + bool hasBMP; LOG_MESSAGE(PLID, "Precaching %d player models", precache_count); for (int i = 0; i < precache_count; i++) { - LOG_MESSAGE(PLID, "Precaching model: %s (contributed by %s)", precache_list[i].modelname, precache_list[i].playername); - g_engfuncs.pfnPrecacheModel( precache_list[i].paths.model ); - if (fileExists( precache_list[i].paths.bmp )) - { - LOG_MESSAGE(PLID, "Precaching bmp: %s", precache_list[i].paths.bmp); - g_engfuncs.pfnPrecacheGeneric( precache_list[i].paths.bmp ); - } - else - LOG_MESSAGE(PLID, "File not found: %s", precache_list[i].paths.bmp); + hasBMP = fileExists(precache_list[i].paths.bmp); + LOG_MESSAGE(PLID, "Precaching model %s: %s (contributed by %s)", + hasBMP ? "(with bmp)" : "(without bmp)", + precache_list[i].modelname, precache_list[i].playername); + g_engfuncs.pfnPrecacheModel(precache_list[i].paths.model); + if (hasBMP) + g_engfuncs.pfnPrecacheGeneric(precache_list[i].paths.bmp); } precache_count = 0; RETURN_META(MRES_HANDLED);