General: Dont apply model if not precached.

This commit is contained in:
zaCade 2018-08-13 16:07:04 +02:00
parent dc8ea3be56
commit ced7d3c352
1 changed files with 7 additions and 0 deletions

View File

@ -188,6 +188,13 @@ bool:ClassApplyModel(client, classindex, cachetype = ZR_CLASS_CACHE_PLAYER)
}
}
// Check if the model is precached.
if (!IsModelPrecached(modelpath))
{
LogEvent(false, LogType_Error, LOG_CORE_EVENTS, LogModule_Playerclasses, "Config Validation", "Warning: Model not precached, not applying model. \"%s\"", modelpath);
return true;
}
SetEntityModel(client, modelpath);
SetEntProp(client, Prop_Send, "m_nSkin", skinIndex);