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:
 | 
				
			||||||
//----------------------------------------------------------------------------------------------------
 | 
					//----------------------------------------------------------------------------------------------------
 | 
				
			||||||
@ -1233,4 +1239,4 @@ public Action VoteLeader(int client, int argc)
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return Plugin_Handled;
 | 
						return Plugin_Handled;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user