mirror of
				https://github.com/KartKrewDev/RingRacers.git
				synced 2025-10-30 08:01:28 +00:00 
			
		
		
		
	Fix K_GetGPPlayerCount off by one
This commit is contained in:
		
							parent
							
								
									fea4b0bd2a
								
							
						
					
					
						commit
						6096c9bef4
					
				
					 1 changed files with 5 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -104,15 +104,11 @@ INT16 K_CalculateGPRankPoints(UINT8 position, UINT8 numplayers)
 | 
			
		|||
--------------------------------------------------*/
 | 
			
		||||
UINT8 K_GetGPPlayerCount(UINT8 humans)
 | 
			
		||||
{
 | 
			
		||||
	UINT8 playerCount = 8;
 | 
			
		||||
 | 
			
		||||
	if (humans > 2)
 | 
			
		||||
	{
 | 
			
		||||
		// Add 3 bots per player beyond 2P
 | 
			
		||||
		playerCount += (humans - 2) * 3;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return playerCount;
 | 
			
		||||
	// 1P -> 8 total
 | 
			
		||||
	// 2P -> 8 total
 | 
			
		||||
	// 3P -> 12 total
 | 
			
		||||
	// 4P -> 16 total
 | 
			
		||||
	return max(min(humans * 4, MAXPLAYERS), 8);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*--------------------------------------------------
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue