leader: move download + precache to OnConfigsExecuted()
This commit is contained in:
parent
6e3b10fc05
commit
09a4ea7e4e
@ -173,16 +173,6 @@ public void ConVarChange(ConVar CVar, const char[] oldVal, const char[] newVal)
|
|||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
public void OnMapStart()
|
public void OnMapStart()
|
||||||
{
|
{
|
||||||
AddFileToDownloadsTable(DefendVTF);
|
|
||||||
AddFileToDownloadsTable(DefendVMT);
|
|
||||||
AddFileToDownloadsTable(FollowVTF);
|
|
||||||
AddFileToDownloadsTable(FollowVMT);
|
|
||||||
|
|
||||||
PrecacheGeneric(DefendVTF, true);
|
|
||||||
PrecacheGeneric(DefendVMT, true);
|
|
||||||
PrecacheGeneric(FollowVTF, true);
|
|
||||||
PrecacheGeneric(FollowVMT, true);
|
|
||||||
|
|
||||||
Handle gameConfig = LoadGameConfigFile("funcommands.games");
|
Handle gameConfig = LoadGameConfigFile("funcommands.games");
|
||||||
if (gameConfig == null)
|
if (gameConfig == null)
|
||||||
{
|
{
|
||||||
@ -203,6 +193,22 @@ public void OnMapStart()
|
|||||||
UpdateLeaders();
|
UpdateLeaders();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------------------------
|
||||||
|
// Purpose:
|
||||||
|
//----------------------------------------------------------------------------------------------------
|
||||||
|
public void OnConfigsExecuted()
|
||||||
|
{
|
||||||
|
AddFileToDownloadsTable(DefendVTF);
|
||||||
|
AddFileToDownloadsTable(DefendVMT);
|
||||||
|
AddFileToDownloadsTable(FollowVTF);
|
||||||
|
AddFileToDownloadsTable(FollowVMT);
|
||||||
|
|
||||||
|
PrecacheGeneric(DefendVTF, true);
|
||||||
|
PrecacheGeneric(DefendVMT, true);
|
||||||
|
PrecacheGeneric(FollowVTF, true);
|
||||||
|
PrecacheGeneric(FollowVMT, true);
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
// Purpose:
|
// Purpose:
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user