Caching models on startup instead of on infection. Probably fixes the freeze on infection problem.
This commit is contained in:
parent
62ddc62e0e
commit
ebb387d009
|
@ -71,6 +71,7 @@ LoadModelData()
|
|||
Format(modelpath, sizeof(modelpath), "%s%s", model, modelSuffix[y]);
|
||||
if (FileExists(modelpath))
|
||||
{
|
||||
PrecacheModel(modelpath);
|
||||
AddFileToDownloadsTable(modelpath);
|
||||
}
|
||||
}
|
||||
|
@ -136,4 +137,3 @@ ApplyZombieModel(client)
|
|||
|
||||
SetPlayerModel(client, modelpath);
|
||||
}
|
||||
|
||||
|
|
|
@ -198,13 +198,7 @@ TerminateRound(Float:delay, reason)
|
|||
|
||||
SetPlayerModel(client, const String:model[])
|
||||
{
|
||||
new log_debug = LogFlagCheck(LOG_DEBUG_DETAIL, LOG_MODULE_OFFSETS);
|
||||
if (log_debug) ZR_LogMessageFormatted(-1, "offsets", "models", "Precaching model (\"%s\").", true, model);
|
||||
PrecacheModel(model);
|
||||
if (log_debug) ZR_LogMessageFormatted(-1, "offsets", "models", "Model cached.", true, model);
|
||||
if (log_debug) ZR_LogMessageFormatted(-1, "offsets", "models", "Applying model (\"%s\") on client %d.", true, model, client);
|
||||
SetEntityModel(client, model);
|
||||
if (log_debug) ZR_LogMessageFormatted(-1, "offsets", "models", "Model applied on client %d.", true, model, client);
|
||||
}
|
||||
|
||||
SetPlayerAlpha(client, alpha)
|
||||
|
|
Loading…
Reference in New Issue
Block a user