}
void ServerActivate(edict_t *pEdictList, int edictCount, int clientMax) {
+ // Precache teamplay models, if it's teamplay
+ if (gpGlobals->teamplay) {
+ LOG_MESSAGE(PLID, "Adding teamplay models to precache list");
+ char teamlist[256];
+ strncpy(teamlist, CVAR_GET_STRING("mp_teamlist"), 255);
+ char *teammodel = strtok(teamlist, ";");
+
+ while (teammodel != NULL) {
+ if (addPrecacheEntry( "server teamplay", teammodel ))
+ LOG_MESSAGE(PLID, "Added teamplay model %s to precache list", teammodel);
+ else
+ LOG_MESSAGE(PLID, "Teamplay model %s not added - redundant or precache list is full", teammodel);
+ teammodel = strtok(NULL, ";");
+ }
+ }
+
bool hasBMP, hasTMDL;
LOG_MESSAGE(PLID, "Precaching %d player models", precache_count);
for (int i = 0; i < precache_count; i++) {