mirror of
				https://github.com/KartKrewDev/RingRacers.git
				synced 2025-10-30 08:01:28 +00:00 
			
		
		
		
	Fix confusion between nodes and players in ping updating code and PT_PING packet sending code
This commit is contained in:
		
							parent
							
								
									2223283208
								
							
						
					
					
						commit
						3d86e7135d
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -4529,8 +4529,8 @@ static inline void PingUpdate(void)
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	//send out our ping packets
 | 
			
		||||
	for (i = 0; i < MAXPLAYERS; i++)
 | 
			
		||||
		if (playeringame[i])
 | 
			
		||||
	for (i = 0; i < MAXNETNODES; i++)
 | 
			
		||||
		if (nodeingame[i])
 | 
			
		||||
			HSendPacket(i, true, 0, sizeof(INT32) * MAXPLAYERS);
 | 
			
		||||
 | 
			
		||||
	pingmeasurecount = 1; //Reset count
 | 
			
		||||
| 
						 | 
				
			
			@ -4571,9 +4571,9 @@ void NetUpdate(void)
 | 
			
		|||
	if (server)
 | 
			
		||||
	{
 | 
			
		||||
		// update node latency values so we can take an average later.
 | 
			
		||||
		for (i = 0; i < MAXNETNODES; i++)
 | 
			
		||||
		for (i = 0; i < MAXPLAYERS; i++)
 | 
			
		||||
			if (playeringame[i])
 | 
			
		||||
				realpingtable[i] += G_TicsToMilliseconds(GetLag(i));
 | 
			
		||||
				realpingtable[i] += G_TicsToMilliseconds(GetLag(playernode[i]));
 | 
			
		||||
		pingmeasurecount++;
 | 
			
		||||
	}
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue