mirror of
				https://github.com/KartKrewDev/RingRacers.git
				synced 2025-10-30 08:01:28 +00:00 
			
		
		
		
	Remove maxsend limit, default to 200MB maxsend, increment value in menus by 1024 each step
This commit is contained in:
		
							parent
							
								
									686f1ac1e1
								
							
						
					
					
						commit
						4c03180781
					
				
					 3 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -622,7 +622,7 @@ void Lagless_OnChange(void);
 | 
			
		|||
consvar_t cv_lagless = NetVar("lagless", "Off").on_off().onchange(Lagless_OnChange);
 | 
			
		||||
 | 
			
		||||
// max file size to send to a player (in kilobytes)
 | 
			
		||||
consvar_t cv_maxsend = NetVar("maxsend", "51200").min_max(0, 51200);
 | 
			
		||||
consvar_t cv_maxsend = NetVar("maxsend", "204800").min_max(-1, 999999999);
 | 
			
		||||
 | 
			
		||||
consvar_t cv_noticedownload = NetVar("noticedownload", "Off").on_off();
 | 
			
		||||
consvar_t cv_pingtimeout = NetVar("maxdelaytimeout", "10").min_max(8, 120);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -204,7 +204,7 @@ UINT8 *PutFileNeeded(UINT16 firstfile)
 | 
			
		|||
		// Store in the upper four bits
 | 
			
		||||
		if (!cv_downloading.value)
 | 
			
		||||
			filestatus += (2 << 4); // Won't send
 | 
			
		||||
		else if ((wadfiles[i]->filesize <= (UINT32)cv_maxsend.value * 1024))
 | 
			
		||||
		else if (cv_maxsend.value == -1 || wadfiles[i]->filesize <= (UINT32)cv_maxsend.value * 1024)
 | 
			
		||||
			filestatus += (1 << 4); // Will send if requested
 | 
			
		||||
		// else
 | 
			
		||||
			// filestatus += (0 << 4); -- Won't send, too big
 | 
			
		||||
| 
						 | 
				
			
			@ -964,7 +964,7 @@ static boolean AddFileToSendQueue(INT32 node, const char *filename, UINT8 fileid
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	// Handle huge file requests (i.e. bigger than cv_maxsend.value KB)
 | 
			
		||||
	if (wadfiles[i]->filesize > (UINT32)cv_maxsend.value * 1024)
 | 
			
		||||
	if (cv_maxsend.value != -1 && wadfiles[i]->filesize > (UINT32)cv_maxsend.value * 1024)
 | 
			
		||||
	{
 | 
			
		||||
		// Too big
 | 
			
		||||
		// Don't inform client (client sucks, man)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -176,7 +176,7 @@ void M_ChangeCvarDirect(INT32 choice, consvar_t *cv)
 | 
			
		|||
		if (cv == &cv_nettimeout || cv == &cv_jointimeout)
 | 
			
		||||
			choice *= (TICRATE/7);
 | 
			
		||||
		else if (cv == &cv_maxsend)
 | 
			
		||||
			choice *= 512;
 | 
			
		||||
			choice *= 1024;
 | 
			
		||||
 | 
			
		||||
		CV_AddValue(cv, choice);
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue