Debug: Log number of GRFs at level sl=2 when loading a game
Add helper to get the number of non-static GRFs in a GRF config
This commit is contained in:
		@@ -499,15 +499,8 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendNewGRFCheck()
 | 
			
		||||
		return this->SendNeedGamePassword();
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	const GRFConfig *c;
 | 
			
		||||
	uint grf_count = 0;
 | 
			
		||||
 | 
			
		||||
	for (c = _grfconfig; c != nullptr; c = c->next) {
 | 
			
		||||
		if (!HasBit(c->flags, GCF_STATIC)) grf_count++;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	p->Send_uint32(grf_count);
 | 
			
		||||
	for (c = _grfconfig; c != nullptr; c = c->next) {
 | 
			
		||||
	p->Send_uint32(GetGRFConfigListNonStaticCount(_grfconfig));
 | 
			
		||||
	for (const GRFConfig *c = _grfconfig; c != nullptr; c = c->next) {
 | 
			
		||||
		if (!HasBit(c->flags, GCF_STATIC)) SerializeGRFIdentifier(*p, c->ident);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user