mirror of
				https://github.com/luanti-org/luanti.git
				synced 2025-11-04 01:05:48 +01:00 
			
		
		
		
	HOTFIX: fix too agressive block culling
This commit is contained in:
		@@ -244,7 +244,10 @@ bool isBlockInSight(v3s16 blockpos_b, v3f camera_pos, v3f camera_dir,
 | 
			
		||||
	f32 cosangle = dforward / blockpos_adj.getLength();
 | 
			
		||||
 | 
			
		||||
	// If block is not in the field of view, skip it
 | 
			
		||||
	if(cosangle < cos(camera_fov / 2))
 | 
			
		||||
	// HOTFIX: use sligthly increased angle (+10%) to fix too agressive
 | 
			
		||||
	// culling. Somebody have to find out whats wrong with the math here.
 | 
			
		||||
	// Previous value: camera_fov / 2
 | 
			
		||||
	if(cosangle < cos(camera_fov * 0.55))
 | 
			
		||||
		return false;
 | 
			
		||||
 | 
			
		||||
	return true;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user