Revert "TopDefenders: Add a loop that compares deaths."
This reverts commit ffb59ecca3.
			
			
This commit is contained in:
		
							parent
							
								
									ffb59ecca3
								
							
						
					
					
						commit
						61b2dea52a
					
				@ -299,7 +299,6 @@ public int SortDefendersList(int[] elem1, int[] elem2, const int[][] array, Hand
 | 
			
		||||
//----------------------------------------------------------------------------------------------------
 | 
			
		||||
public Action UpdateScoreboard(Handle timer)
 | 
			
		||||
{
 | 
			
		||||
	int iDeathsList[MAXPLAYERS+1];
 | 
			
		||||
	int iSortedList[MAXPLAYERS+1][2];
 | 
			
		||||
	int iSortedCount;
 | 
			
		||||
 | 
			
		||||
@ -308,7 +307,7 @@ public Action UpdateScoreboard(Handle timer)
 | 
			
		||||
		if (!IsClientInGame(client))
 | 
			
		||||
			continue;
 | 
			
		||||
 | 
			
		||||
		iDeathsList[client] = 0;
 | 
			
		||||
		SetEntProp(client, Prop_Data, "m_iDeaths", 0);
 | 
			
		||||
 | 
			
		||||
		if (!g_iPlayerDamage[client])
 | 
			
		||||
			continue;
 | 
			
		||||
@ -322,18 +321,7 @@ public Action UpdateScoreboard(Handle timer)
 | 
			
		||||
 | 
			
		||||
	for (int rank = 0; rank < iSortedCount; rank++)
 | 
			
		||||
	{
 | 
			
		||||
		iDeathsList[iSortedList[rank][0]] = rank + 1;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	for (int client = 1; client <= MaxClients; client++)
 | 
			
		||||
	{
 | 
			
		||||
		if (!IsClientInGame(client))
 | 
			
		||||
			continue;
 | 
			
		||||
 | 
			
		||||
		if (GetEntProp(client, Prop_Data, "m_iDeaths") != iDeathsList[client])
 | 
			
		||||
		{
 | 
			
		||||
			SetEntProp(client, Prop_Data, "m_iDeaths", iDeathsList[client]);
 | 
			
		||||
		}
 | 
			
		||||
		SetEntProp(iSortedList[rank][0], Prop_Data, "m_iDeaths", rank + 1);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user