}
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);